conways_game_of_life.py:46 picture
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
STACK [2]
x1
conways_game_of_life.py:46
def picture(world, Xs: range, Ys: range) -> str:
world=<too long>
x1
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long>
x1
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
world=<too long>
x1
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x2
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
x2
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
x3
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x2
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=0 world=<too long>
x2
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=0 world=<too long>
x3
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x4
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0
x4
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0
x5
48
return
 . 
world=<too long> y=0 x=0
x6
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x7
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=0
x7
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=0
x8
48
return
 . 
world=<too long> y=0 x=1
x9
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x10
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=1
x10
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=1
x11
48
return
 . 
world=<too long> y=0 x=2
x12
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x13
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=2
x13
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=2
x14
48
return
 . 
world=<too long> y=0 x=3
x15
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x16
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=3
x16
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=3
x17
48
return
 . 
world=<too long> y=0 x=4
x18
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x19
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=4
x19
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=4
x20
48
return
 . 
world=<too long> y=0 x=5
x21
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x22
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=5
x22
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=5
x23
48
return
 @ 
world=<too long> y=0 x=6
x24
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x25
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=6
x25
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=6
x26
48
return
 . 
world=<too long> y=0 x=7
x27
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x28
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=7
x28
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=7
x29
48
return
 @ 
world=<too long> y=0 x=8
x30
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x31
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=8
x31
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=8
x32
48
return
 . 
world=<too long> y=0 x=9
x33
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x34
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=9
x34
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=9
x35
48
return
 . 
world=<too long> y=0 x=10
x36
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x37
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=10
x37
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=10
x38
48
return
 . 
world=<too long> y=0 x=11
x39
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x40
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=11
x40
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=11
x41
48
return
 . 
world=<too long> y=0 x=12
x42
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x43
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=12
x43
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=12
x44
48
return
 . 
world=<too long> y=0 x=13
x45
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x46
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=13
x46
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=13
x47
48
return
 . 
world=<too long> y=0 x=14
x48
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x49
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=14
x49
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=0 x=14
x50
48
return
 None 
world=<too long> y=0 x=14
x51
48
return
 . . . . . . @ . @ . . . . . . 
y=0 world=<too long>
x52
49
return
 . . . . . . @ . @ . . . . . . 
y=0
x4
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x5
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=0
x5
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=0
x6
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x53
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=1 world=<too long>
x53
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=1 world=<too long>
x54
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x55
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1
x55
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1
x56
48
return
 . 
world=<too long> y=1 x=0
x57
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x58
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=0
x58
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=0
x59
48
return
 . 
world=<too long> y=1 x=1
x60
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x61
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=1
x61
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=1
x62
48
return
 . 
world=<too long> y=1 x=2
x63
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x64
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=2
x64
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=2
x65
48
return
 @ 
world=<too long> y=1 x=3
x66
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x67
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=3
x67
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=3
x68
48
return
 . 
world=<too long> y=1 x=4
x69
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x70
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=4
x70
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=4
x71
48
return
 . 
world=<too long> y=1 x=5
x72
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x73
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=5
x73
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=5
x74
48
return
 @ 
world=<too long> y=1 x=6
x75
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x76
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=6
x76
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=6
x77
48
return
 . 
world=<too long> y=1 x=7
x78
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x79
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=7
x79
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=7
x80
48
return
 . 
world=<too long> y=1 x=8
x81
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x82
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=8
x82
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=8
x83
48
return
 . 
world=<too long> y=1 x=9
x84
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x85
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=9
x85
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=9
x86
48
return
 . 
world=<too long> y=1 x=10
x87
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x88
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=10
x88
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=10
x89
48
return
 . 
world=<too long> y=1 x=11
x90
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x91
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=11
x91
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=11
x92
48
return
 . 
world=<too long> y=1 x=12
x93
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x94
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=12
x94
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=12
x95
48
return
 . 
world=<too long> y=1 x=13
x96
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x97
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=13
x97
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=13
x98
48
return
 . 
world=<too long> y=1 x=14
x99
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x100
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=14
x100
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=1 x=14
x101
48
return
 None 
world=<too long> y=1 x=14
x102
48
return
 . . . @ . . @ . . . . . . . . 
y=1 world=<too long>
x103
49
return
 . . . @ . . @ . . . . . . . . 
y=1
x7
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x8
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=1
x8
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=1
x9
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x104
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=2 world=<too long>
x104
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=2 world=<too long>
x105
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x106
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2
x106
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2
x107
48
return
 . 
world=<too long> y=2 x=0
x108
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x109
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=0
x109
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=0
x110
48
return
 . 
world=<too long> y=2 x=1
x111
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x112
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=1
x112
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=1
x113
48
return
 @ 
world=<too long> y=2 x=2
x114
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x115
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=2
x115
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=2
x116
48
return
 @ 
world=<too long> y=2 x=3
x117
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x118
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=3
x118
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=3
x119
48
return
 @ 
world=<too long> y=2 x=4
x120
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x121
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=4
x121
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=4
x122
48
return
 . 
world=<too long> y=2 x=5
x123
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x124
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=5
x124
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=5
x125
48
return
 . 
world=<too long> y=2 x=6
x126
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x127
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=6
x127
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=6
x128
48
return
 . 
world=<too long> y=2 x=7
x129
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x130
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=7
x130
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=7
x131
48
return
 @ 
world=<too long> y=2 x=8
x132
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x133
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=8
x133
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=8
x134
48
return
 . 
world=<too long> y=2 x=9
x135
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x136
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=9
x136
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=9
x137
48
return
 . 
world=<too long> y=2 x=10
x138
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x139
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=10
x139
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=10
x140
48
return
 . 
world=<too long> y=2 x=11
x141
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x142
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=11
x142
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=11
x143
48
return
 . 
world=<too long> y=2 x=12
x144
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x145
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=12
x145
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=12
x146
48
return
 . 
world=<too long> y=2 x=13
x147
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x148
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=13
x148
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=13
x149
48
return
 . 
world=<too long> y=2 x=14
x150
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x151
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=14
x151
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=2 x=14
x152
48
return
 None 
world=<too long> y=2 x=14
x153
48
return
 . . @ @ @ . . . @ . . . . . . 
y=2 world=<too long>
x154
49
return
 . . @ @ @ . . . @ . . . . . . 
y=2
x10
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x11
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=2
x11
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=2
x12
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x155
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=3 world=<too long>
x155
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=3 world=<too long>
x156
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x157
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3
x157
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3
x158
48
return
 @ 
world=<too long> y=3 x=0
x159
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x160
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=0
x160
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=0
x161
48
return
 . 
world=<too long> y=3 x=1
x162
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x163
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=1
x163
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=1
x164
48
return
 @ 
world=<too long> y=3 x=2
x165
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x166
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=2
x166
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=2
x167
48
return
 . 
world=<too long> y=3 x=3
x168
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x169
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=3
x169
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=3
x170
48
return
 . 
world=<too long> y=3 x=4
x171
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x172
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=4
x172
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=4
x173
48
return
 . 
world=<too long> y=3 x=5
x174
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x175
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=5
x175
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=5
x176
48
return
 . 
world=<too long> y=3 x=6
x177
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x178
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=6
x178
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=6
x179
48
return
 . 
world=<too long> y=3 x=7
x180
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x181
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=7
x181
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=7
x182
48
return
 . 
world=<too long> y=3 x=8
x183
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x184
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=8
x184
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=8
x185
48
return
 @ 
world=<too long> y=3 x=9
x186
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x187
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=9
x187
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=9
x188
48
return
 . 
world=<too long> y=3 x=10
x189
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x190
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=10
x190
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=10
x191
48
return
 . 
world=<too long> y=3 x=11
x192
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x193
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=11
x193
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=11
x194
48
return
 . 
world=<too long> y=3 x=12
x195
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x196
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=12
x196
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=12
x197
48
return
 . 
world=<too long> y=3 x=13
x198
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x199
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=13
x199
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=13
x200
48
return
 . 
world=<too long> y=3 x=14
x201
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x202
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=14
x202
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=3 x=14
x203
48
return
 None 
world=<too long> y=3 x=14
x204
48
return
 @ . @ . . . . . . @ . . . . . 
y=3 world=<too long>
x205
49
return
 @ . @ . . . . . . @ . . . . . 
y=3
x13
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x14
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=3
x14
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=3
x15
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x206
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=4 world=<too long>
x206
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=4 world=<too long>
x207
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x208
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4
x208
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4
x209
48
return
 . 
world=<too long> y=4 x=0
x210
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x211
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=0
x211
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=0
x212
48
return
 . 
world=<too long> y=4 x=1
x213
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x214
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=1
x214
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=1
x215
48
return
 . 
world=<too long> y=4 x=2
x216
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x217
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=2
x217
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=2
x218
48
return
 . 
world=<too long> y=4 x=3
x219
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x220
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=3
x220
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=3
x221
48
return
 . 
world=<too long> y=4 x=4
x222
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x223
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=4
x223
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=4
x224
48
return
 @ 
world=<too long> y=4 x=5
x225
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x226
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=5
x226
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=5
x227
48
return
 . 
world=<too long> y=4 x=6
x228
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x229
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=6
x229
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=6
x230
48
return
 . 
world=<too long> y=4 x=7
x231
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x232
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=7
x232
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=7
x233
48
return
 . 
world=<too long> y=4 x=8
x234
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x235
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=8
x235
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=8
x236
48
return
 . 
world=<too long> y=4 x=9
x237
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x238
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=9
x238
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=9
x239
48
return
 . 
world=<too long> y=4 x=10
x240
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x241
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=10
x241
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=10
x242
48
return
 . 
world=<too long> y=4 x=11
x243
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x244
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=11
x244
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=11
x245
48
return
 . 
world=<too long> y=4 x=12
x246
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x247
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=12
x247
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=12
x248
48
return
 . 
world=<too long> y=4 x=13
x249
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x250
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=13
x250
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=13
x251
48
return
 . 
world=<too long> y=4 x=14
x252
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x253
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=14
x253
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=4 x=14
x254
48
return
 None 
world=<too long> y=4 x=14
x255
48
return
 . . . . . @ . . . . . . . . . 
y=4 world=<too long>
x256
49
return
 . . . . . @ . . . . . . . . . 
y=4
x16
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x17
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=4
x17
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=4
x18
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x257
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=5 world=<too long>
x257
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=5 world=<too long>
x258
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x259
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5
x259
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5
x260
48
return
 . 
world=<too long> y=5 x=0
x261
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x262
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=0
x262
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=0
x263
48
return
 . 
world=<too long> y=5 x=1
x264
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x265
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=1
x265
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=1
x266
48
return
 . 
world=<too long> y=5 x=2
x267
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x268
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=2
x268
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=2
x269
48
return
 @ 
world=<too long> y=5 x=3
x270
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x271
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=3
x271
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=3
x272
48
return
 . 
world=<too long> y=5 x=4
x273
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x274
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=4
x274
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=4
x275
48
return
 . 
world=<too long> y=5 x=5
x276
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x277
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=5
x277
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=5
x278
48
return
 . 
world=<too long> y=5 x=6
x279
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x280
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=6
x280
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=6
x281
48
return
 @ 
world=<too long> y=5 x=7
x282
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x283
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=7
x283
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=7
x284
48
return
 . 
world=<too long> y=5 x=8
x285
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x286
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=8
x286
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=8
x287
48
return
 . 
world=<too long> y=5 x=9
x288
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x289
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=9
x289
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=9
x290
48
return
 . 
world=<too long> y=5 x=10
x291
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x292
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=10
x292
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=10
x293
48
return
 . 
world=<too long> y=5 x=11
x294
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x295
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=11
x295
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=11
x296
48
return
 . 
world=<too long> y=5 x=12
x297
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x298
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=12
x298
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=12
x299
48
return
 . 
world=<too long> y=5 x=13
x300
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x301
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=13
x301
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=13
x302
48
return
 . 
world=<too long> y=5 x=14
x303
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x304
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=14
x304
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=5 x=14
x305
48
return
 None 
world=<too long> y=5 x=14
x306
48
return
 . . . @ . . . @ . . . . . . . 
y=5 world=<too long>
x307
49
return
 . . . @ . . . @ . . . . . . . 
y=5
x19
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x20
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=5
x20
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=5
x21
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x308
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=6 world=<too long>
x308
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=6 world=<too long>
x309
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x310
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6
x310
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6
x311
48
return
 . 
world=<too long> y=6 x=0
x312
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x313
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=0
x313
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=0
x314
48
return
 @ 
world=<too long> y=6 x=1
x315
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x316
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=1
x316
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=1
x317
48
return
 @ 
world=<too long> y=6 x=2
x318
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x319
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=2
x319
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=2
x320
48
return
 . 
world=<too long> y=6 x=3
x321
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x322
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=3
x322
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=3
x323
48
return
 . 
world=<too long> y=6 x=4
x324
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x325
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=4
x325
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=4
x326
48
return
 . 
world=<too long> y=6 x=5
x327
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x328
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=5
x328
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=5
x329
48
return
 . 
world=<too long> y=6 x=6
x330
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x331
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=6
x331
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=6
x332
48
return
 . 
world=<too long> y=6 x=7
x333
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x334
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=7
x334
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=7
x335
48
return
 @ 
world=<too long> y=6 x=8
x336
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x337
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=8
x337
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=8
x338
48
return
 . 
world=<too long> y=6 x=9
x339
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x340
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=9
x340
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=9
x341
48
return
 . 
world=<too long> y=6 x=10
x342
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x343
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=10
x343
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=10
x344
48
return
 . 
world=<too long> y=6 x=11
x345
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x346
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=11
x346
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=11
x347
48
return
 . 
world=<too long> y=6 x=12
x348
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x349
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=12
x349
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=12
x350
48
return
 . 
world=<too long> y=6 x=13
x351
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x352
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=13
x352
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=13
x353
48
return
 . 
world=<too long> y=6 x=14
x354
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x355
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=14
x355
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=6 x=14
x356
48
return
 None 
world=<too long> y=6 x=14
x357
48
return
 . @ @ . . . . . @ . . . . . . 
y=6 world=<too long>
x358
49
return
 . @ @ . . . . . @ . . . . . . 
y=6
x22
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x23
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=6
x23
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=6
x24
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x359
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=7 world=<too long>
x359
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=7 world=<too long>
x360
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x361
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7
x361
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7
x362
48
return
 . 
world=<too long> y=7 x=0
x363
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x364
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=0
x364
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=0
x365
48
return
 . 
world=<too long> y=7 x=1
x366
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x367
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=1
x367
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=1
x368
48
return
 . 
world=<too long> y=7 x=2
x369
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x370
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=2
x370
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=2
x371
48
return
 . 
world=<too long> y=7 x=3
x372
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x373
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=3
x373
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=3
x374
48
return
 . 
world=<too long> y=7 x=4
x375
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x376
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=4
x376
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=4
x377
48
return
 . 
world=<too long> y=7 x=5
x378
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x379
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=5
x379
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=5
x380
48
return
 . 
world=<too long> y=7 x=6
x381
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x382
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=6
x382
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=6
x383
48
return
 . 
world=<too long> y=7 x=7
x384
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x385
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=7
x385
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=7
x386
48
return
 . 
world=<too long> y=7 x=8
x387
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x388
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=8
x388
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=8
x389
48
return
 . 
world=<too long> y=7 x=9
x390
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x391
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=9
x391
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=9
x392
48
return
 . 
world=<too long> y=7 x=10
x393
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x394
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=10
x394
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=10
x395
48
return
 . 
world=<too long> y=7 x=11
x396
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x397
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=11
x397
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=11
x398
48
return
 . 
world=<too long> y=7 x=12
x399
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x400
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=12
x400
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=12
x401
48
return
 . 
world=<too long> y=7 x=13
x402
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x403
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=13
x403
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=13
x404
48
return
 . 
world=<too long> y=7 x=14
x405
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x406
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=14
x406
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=7 x=14
x407
48
return
 None 
world=<too long> y=7 x=14
x408
48
return
 . . . . . . . . . . . . . . . 
y=7 world=<too long>
x409
49
return
 . . . . . . . . . . . . . . . 
y=7
x25
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x26
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=7
x26
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=7
x27
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x410
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=8 world=<too long>
x410
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=8 world=<too long>
x411
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x412
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8
x412
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8
x413
48
return
 . 
world=<too long> y=8 x=0
x414
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x415
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=0
x415
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=0
x416
48
return
 . 
world=<too long> y=8 x=1
x417
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x418
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=1
x418
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=1
x419
48
return
 . 
world=<too long> y=8 x=2
x420
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x421
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=2
x421
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=2
x422
48
return
 . 
world=<too long> y=8 x=3
x423
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x424
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=3
x424
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=3
x425
48
return
 . 
world=<too long> y=8 x=4
x426
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x427
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=4
x427
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=4
x428
48
return
 . 
world=<too long> y=8 x=5
x429
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x430
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=5
x430
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=5
x431
48
return
 . 
world=<too long> y=8 x=6
x432
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x433
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=6
x433
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=6
x434
48
return
 . 
world=<too long> y=8 x=7
x435
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x436
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=7
x436
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=7
x437
48
return
 @ 
world=<too long> y=8 x=8
x438
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x439
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=8
x439
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=8
x440
48
return
 . 
world=<too long> y=8 x=9
x441
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x442
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=9
x442
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=9
x443
48
return
 . 
world=<too long> y=8 x=10
x444
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x445
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=10
x445
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=10
x446
48
return
 . 
world=<too long> y=8 x=11
x447
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x448
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=11
x448
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=11
x449
48
return
 . 
world=<too long> y=8 x=12
x450
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x451
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=12
x451
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=12
x452
48
return
 . 
world=<too long> y=8 x=13
x453
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x454
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=13
x454
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=13
x455
48
return
 . 
world=<too long> y=8 x=14
x456
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x457
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=14
x457
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=8 x=14
x458
48
return
 None 
world=<too long> y=8 x=14
x459
48
return
 . . . . . . . . @ . . . . . . 
y=8 world=<too long>
x460
49
return
 . . . . . . . . @ . . . . . . 
y=8
x28
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x29
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=8
x29
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=8
x30
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x461
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=9 world=<too long>
x461
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=9 world=<too long>
x462
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x463
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9
x463
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9
x464
48
return
 . 
world=<too long> y=9 x=0
x465
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x466
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=0
x466
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=0
x467
48
return
 . 
world=<too long> y=9 x=1
x468
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x469
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=1
x469
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=1
x470
48
return
 . 
world=<too long> y=9 x=2
x471
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x472
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=2
x472
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=2
x473
48
return
 . 
world=<too long> y=9 x=3
x474
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x475
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=3
x475
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=3
x476
48
return
 . 
world=<too long> y=9 x=4
x477
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x478
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=4
x478
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=4
x479
48
return
 . 
world=<too long> y=9 x=5
x480
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x481
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=5
x481
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=5
x482
48
return
 . 
world=<too long> y=9 x=6
x483
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x484
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=6
x484
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=6
x485
48
return
 @ 
world=<too long> y=9 x=7
x486
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x487
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=7
x487
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=7
x488
48
return
 . 
world=<too long> y=9 x=8
x489
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x490
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=8
x490
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=8
x491
48
return
 . 
world=<too long> y=9 x=9
x492
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x493
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=9
x493
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=9
x494
48
return
 . 
world=<too long> y=9 x=10
x495
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x496
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=10
x496
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=10
x497
48
return
 . 
world=<too long> y=9 x=11
x498
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x499
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=11
x499
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=11
x500
48
return
 . 
world=<too long> y=9 x=12
x501
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x502
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=12
x502
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=12
x503
48
return
 . 
world=<too long> y=9 x=13
x504
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x505
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=13
x505
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=13
x506
48
return
 . 
world=<too long> y=9 x=14
x507
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x508
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=14
x508
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=9 x=14
x509
48
return
 None 
world=<too long> y=9 x=14
x510
48
return
 . . . . . . . @ . . . . . . . 
y=9 world=<too long>
x511
49
return
 . . . . . . . @ . . . . . . . 
y=9
x31
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x32
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=9
x32
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=9
x33
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x512
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=10 world=<too long>
x512
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=10 world=<too long>
x513
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x514
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10
x514
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10
x515
48
return
 . 
world=<too long> y=10 x=0
x516
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x517
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=0
x517
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=0
x518
48
return
 . 
world=<too long> y=10 x=1
x519
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x520
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=1
x520
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=1
x521
48
return
 . 
world=<too long> y=10 x=2
x522
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x523
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=2
x523
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=2
x524
48
return
 . 
world=<too long> y=10 x=3
x525
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x526
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=3
x526
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=3
x527
48
return
 . 
world=<too long> y=10 x=4
x528
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x529
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=4
x529
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=4
x530
48
return
 . 
world=<too long> y=10 x=5
x531
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x532
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=5
x532
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=5
x533
48
return
 . 
world=<too long> y=10 x=6
x534
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x535
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=6
x535
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=6
x536
48
return
 . 
world=<too long> y=10 x=7
x537
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x538
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=7
x538
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=7
x539
48
return
 . 
world=<too long> y=10 x=8
x540
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x541
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=8
x541
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=8
x542
48
return
 . 
world=<too long> y=10 x=9
x543
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x544
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=9
x544
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=9
x545
48
return
 . 
world=<too long> y=10 x=10
x546
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x547
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=10
x547
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=10
x548
48
return
 . 
world=<too long> y=10 x=11
x549
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x550
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=11
x550
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=11
x551
48
return
 . 
world=<too long> y=10 x=12
x552
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x553
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=12
x553
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=12
x554
48
return
 . 
world=<too long> y=10 x=13
x555
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x556
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=13
x556
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=13
x557
48
return
 . 
world=<too long> y=10 x=14
x558
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x559
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=14
x559
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=10 x=14
x560
48
return
 None 
world=<too long> y=10 x=14
x561
48
return
 . . . . . . . . . . . . . . . 
y=10 world=<too long>
x562
49
return
 . . . . . . . . . . . . . . . 
y=10
x34
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x35
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=10
x35
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=10
x36
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x563
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=11 world=<too long>
x563
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=11 world=<too long>
x564
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x565
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11
x565
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11
x566
48
return
 . 
world=<too long> y=11 x=0
x567
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x568
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=0
x568
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=0
x569
48
return
 . 
world=<too long> y=11 x=1
x570
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x571
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=1
x571
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=1
x572
48
return
 . 
world=<too long> y=11 x=2
x573
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x574
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=2
x574
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=2
x575
48
return
 . 
world=<too long> y=11 x=3
x576
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x577
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=3
x577
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=3
x578
48
return
 . 
world=<too long> y=11 x=4
x579
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x580
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=4
x580
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=4
x581
48
return
 . 
world=<too long> y=11 x=5
x582
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x583
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=5
x583
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=5
x584
48
return
 . 
world=<too long> y=11 x=6
x585
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x586
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=6
x586
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=6
x587
48
return
 . 
world=<too long> y=11 x=7
x588
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x589
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=7
x589
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=7
x590
48
return
 . 
world=<too long> y=11 x=8
x591
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x592
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=8
x592
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=8
x593
48
return
 . 
world=<too long> y=11 x=9
x594
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x595
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=9
x595
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=9
x596
48
return
 . 
world=<too long> y=11 x=10
x597
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x598
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=10
x598
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=10
x599
48
return
 . 
world=<too long> y=11 x=11
x600
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x601
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=11
x601
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=11
x602
48
return
 . 
world=<too long> y=11 x=12
x603
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x604
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=12
x604
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=12
x605
48
return
 . 
world=<too long> y=11 x=13
x606
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x607
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=13
x607
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=13
x608
48
return
 . 
world=<too long> y=11 x=14
x609
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x610
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=14
x610
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=11 x=14
x611
48
return
 None 
world=<too long> y=11 x=14
x612
48
return
 . . . . . . . . . . . . . . . 
y=11 world=<too long>
x613
49
return
 . . . . . . . . . . . . . . . 
y=11
x37
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x38
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=11
x38
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=11
x39
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x614
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=12 world=<too long>
x614
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=12 world=<too long>
x615
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x616
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12
x616
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12
x617
48
return
 . 
world=<too long> y=12 x=0
x618
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x619
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=0
x619
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=0
x620
48
return
 . 
world=<too long> y=12 x=1
x621
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x622
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=1
x622
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=1
x623
48
return
 . 
world=<too long> y=12 x=2
x624
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x625
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=2
x625
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=2
x626
48
return
 . 
world=<too long> y=12 x=3
x627
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x628
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=3
x628
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=3
x629
48
return
 . 
world=<too long> y=12 x=4
x630
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x631
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=4
x631
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=4
x632
48
return
 . 
world=<too long> y=12 x=5
x633
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x634
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=5
x634
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=5
x635
48
return
 . 
world=<too long> y=12 x=6
x636
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x637
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=6
x637
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=6
x638
48
return
 . 
world=<too long> y=12 x=7
x639
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x640
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=7
x640
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=7
x641
48
return
 . 
world=<too long> y=12 x=8
x642
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x643
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=8
x643
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=8
x644
48
return
 . 
world=<too long> y=12 x=9
x645
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x646
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=9
x646
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=9
x647
48
return
 . 
world=<too long> y=12 x=10
x648
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x649
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=10
x649
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=10
x650
48
return
 . 
world=<too long> y=12 x=11
x651
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x652
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=11
x652
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=11
x653
48
return
 . 
world=<too long> y=12 x=12
x654
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x655
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=12
x655
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=12
x656
48
return
 . 
world=<too long> y=12 x=13
x657
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x658
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=13
x658
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=13
x659
48
return
 . 
world=<too long> y=12 x=14
x660
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x661
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=14
x661
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=12 x=14
x662
48
return
 None 
world=<too long> y=12 x=14
x663
48
return
 . . . . . . . . . . . . . . . 
y=12 world=<too long>
x664
49
return
 . . . . . . . . . . . . . . . 
y=12
x40
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x41
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=12
x41
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=12
x42
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x665
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=13 world=<too long>
x665
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=13 world=<too long>
x666
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x667
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13
x667
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13
x668
48
return
 . 
world=<too long> y=13 x=0
x669
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x670
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=0
x670
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=0
x671
48
return
 . 
world=<too long> y=13 x=1
x672
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x673
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=1
x673
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=1
x674
48
return
 . 
world=<too long> y=13 x=2
x675
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x676
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=2
x676
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=2
x677
48
return
 . 
world=<too long> y=13 x=3
x678
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x679
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=3
x679
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=3
x680
48
return
 . 
world=<too long> y=13 x=4
x681
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x682
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=4
x682
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=4
x683
48
return
 . 
world=<too long> y=13 x=5
x684
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x685
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=5
x685
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=5
x686
48
return
 . 
world=<too long> y=13 x=6
x687
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x688
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=6
x688
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=6
x689
48
return
 . 
world=<too long> y=13 x=7
x690
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x691
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=7
x691
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=7
x692
48
return
 . 
world=<too long> y=13 x=8
x693
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x694
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=8
x694
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=8
x695
48
return
 . 
world=<too long> y=13 x=9
x696
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x697
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=9
x697
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=9
x698
48
return
 . 
world=<too long> y=13 x=10
x699
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x700
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=10
x700
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=10
x701
48
return
 . 
world=<too long> y=13 x=11
x702
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x703
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=11
x703
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=11
x704
48
return
 . 
world=<too long> y=13 x=12
x705
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x706
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=12
x706
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=12
x707
48
return
 . 
world=<too long> y=13 x=13
x708
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x709
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=13
x709
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=13
x710
48
return
 . 
world=<too long> y=13 x=14
x711
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x712
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=14
x712
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=13 x=14
x713
48
return
 None 
world=<too long> y=13 x=14
x714
48
return
 . . . . . . . . . . . . . . . 
y=13 world=<too long>
x715
49
return
 . . . . . . . . . . . . . . . 
y=13
x43
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x44
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=13
x44
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=13
x45
conways_game_of_life.py:48 row
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [4]
x716
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=14 world=<too long>
x716
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
y=14 world=<too long>
x717
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x718
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14
x718
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14
x719
48
return
 . 
world=<too long> y=14 x=0
x720
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x721
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=0
x721
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=0
x722
48
return
 . 
world=<too long> y=14 x=1
x723
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x724
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=1
x724
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=1
x725
48
return
 . 
world=<too long> y=14 x=2
x726
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x727
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=2
x727
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=2
x728
48
return
 . 
world=<too long> y=14 x=3
x729
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x730
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=3
x730
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=3
x731
48
return
 . 
world=<too long> y=14 x=4
x732
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x733
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=4
x733
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=4
x734
48
return
 . 
world=<too long> y=14 x=5
x735
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x736
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=5
x736
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=5
x737
48
return
 . 
world=<too long> y=14 x=6
x738
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x739
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=6
x739
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=6
x740
48
return
 . 
world=<too long> y=14 x=7
x741
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x742
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=7
x742
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=7
x743
48
return
 . 
world=<too long> y=14 x=8
x744
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x745
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=8
x745
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=8
x746
48
return
 . 
world=<too long> y=14 x=9
x747
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x748
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=9
x748
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=9
x749
48
return
 . 
world=<too long> y=14 x=10
x750
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x751
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=10
x751
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=10
x752
48
return
 . 
world=<too long> y=14 x=11
x753
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x754
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=11
x754
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=11
x755
48
return
 . 
world=<too long> y=14 x=12
x756
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x757
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=12
x757
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=12
x758
48
return
 . 
world=<too long> y=14 x=13
x759
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x760
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=13
x760
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=13
x761
48
return
 . 
world=<too long> y=14 x=14
x762
conways_game_of_life.py:48 <genexpr>
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
STACK [5]
x763
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=14
x763
conways_game_of_life.py:48
    def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
world=<too long> y=14 x=14
x764
48
return
 None 
world=<too long> y=14 x=14
x765
48
return
 . . . . . . . . . . . . . . . 
y=14 world=<too long>
x766
49
return
 . . . . . . . . . . . . . . . 
y=14
x46
conways_game_of_life.py:49 <genexpr>
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
103: 
104: Generation 2
105: . . . . . . . . . . . . . . .
106: . . . . . . . . . . . . . . .
107: . . @ @ @ . . . @ . . . . . .
108: @ . . . @ . . . . @ . . . . .
109: . . @ @ . . . @ @ @ . . . . .
110: . . @ . . . . . . . . . . . .
111: @ @ . . . . . . . . . . . . .
112: . . . . . . . . . . . . . . .
113: . . . . . . . . . . . . . . .
114: . . . . . . . . . . . . . . .
115: . . . . . . . . . . . . . . .
116: . . . . . . . . . . . . . . .
117: . . . . . . . . . . . . . . .
118: . . . . . . . . . . . . . . .
119: . . . . . . . . . . . . . . .
STACK [3]
x47
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=14
x47
conways_game_of_life.py:49
    return '\n'.join(row(y) for y in Ys)
y=14
x48
49
return
 None 
y=14
x49
49
return
 . . . . . . @ . @ . . . . . .
. . . @ . . @ . . . . . . . .
. . @ @ @ . . . @ . . . . . .
@ . @ . . . . . . @ . . . . .
. . . . . @ . . . . . . . . .
. . . @ . . . @ . . . . . . .
. @ @ . . . . . @ . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . @ . . . . . .
. . . . . . . @ . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 
world=<too long>
x50
conways_game_of_life.py:20 next_generation
17:         alive_cells = next_generation(alive_cells)
18: 
19: 
20: def next_generation(alive_cells):
21:     return {
22:         cell
23:         for cell, count in neighbor_counts(alive_cells).items()
24:         if count == 3 or (cell in alive_cells and count == 2)
25:     }
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
STACK [2]
x1
conways_game_of_life.py:20
def next_generation(alive_cells):
alive_cells=<too long>
x1
conways_game_of_life.py:21
    return {
alive_cells=<too long>
x1
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long>
x1
conways_game_of_life.py:27 neighbor_counts
24:         if count == 3 or (cell in alive_cells and count == 2)
25:     }
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
STACK [3]
x1
conways_game_of_life.py:27
def neighbor_counts(alive_cells):
alive_cells=<too long>
x1
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
alive_cells=<too long>
x1
__init__.py:587 __init__
584:     #   http://code.activestate.com/recipes/259174/
585:     #   Knuth, TAOCP Vol. II section 4.6.3
586: 
587:     def __init__(self, iterable=None, /, **kwds):
588:         '''Create a new, empty Counter object.  And if given, count elements
589:         from an input iterable.  Or, initialize the count from another mapping
590:         of elements to their counts.
591: 
592:         >>> c = Counter()                           # a new, empty counter
593:         >>> c = Counter('gallahad')                 # a new counter from an iterable
594:         >>> c = Counter({'a': 4, 'b': 2})           # a new counter from a mapping
595:         >>> c = Counter(a=4, b=2)                   # a new counter from keyword args
596: 
597:         '''
598:         super().__init__()
599:         self.update(iterable, **kwds)
600: 
601:     def __missing__(self, key):
602:         'The count of elements not in the Counter is zero.'
603:         # Needed so that self[missing_item] does not raise KeyError
604:         return 0
605: 
606:     def total(self):
607:         'Sum of the counts'
608:         return sum(self.values())
609: 
610:     def most_common(self, n=None):
611:         '''List the n most common elements and their counts from the most
612:         common to the least.  If n is None, then list all element counts.
613: 
614:         >>> Counter('abracadabra').most_common(3)
615:         [('a', 5), ('b', 2), ('r', 2)]
616: 
617:         '''
618:         # Emulate Bag.sortedByCount from Smalltalk
619:         if n is None:
620:             return sorted(self.items(), key=_itemgetter(1), reverse=True)
621: 
622:         # Lazy import to speedup Python startup time
623:         import heapq
624:         return heapq.nlargest(n, self.items(), key=_itemgetter(1))
625: 
626:     def elements(self):
627:         '''Iterator over elements repeating each as many times as its count.
628: 
629:         >>> c = Counter('ABCABC')
630:         >>> sorted(c.elements())
631:         ['A', 'A', 'B', 'B', 'C', 'C']
632: 
633:         # Knuth's example for prime factors of 1836:  2**2 * 3**3 * 17**1
634:         >>> import math
635:         >>> prime_factors = Counter({2: 2, 3: 3, 17: 1})
636:         >>> math.prod(prime_factors.elements())
637:         1836
638: 
639:         Note, if an element's count has been set to zero or is a negative
640:         number, elements() will ignore it.
641: 
642:         '''
643:         # Emulate Bag.do from Smalltalk and Multiset.begin from C++.
644:         return _chain.from_iterable(_starmap(_repeat, self.items()))
645: 
646:     # Override dict methods where necessary
647: 
648:     @classmethod
649:     def fromkeys(cls, iterable, v=None):
650:         # There is no equivalent method for counters because the semantics
651:         # would be ambiguous in cases such as Counter.fromkeys('aaabbc', v=2).
652:         # Initializing counters to zero values isn't necessary because zero
653:         # is already the default value for counter lookups.  Initializing
654:         # to one is easily accomplished with Counter(set(iterable)).  For
655:         # more exotic cases, create a dictionary first using a dictionary
656:         # comprehension or dict.fromkeys().
657:         raise NotImplementedError(
STACK [4]
x1
__init__.py:587
    def __init__(self, iterable=None, /, **kwds):
self=Counter() kwds={}
x1
__init__.py:598
        super().__init__()
self=Counter() kwds={}
x1
__init__.py:599
        self.update(iterable, **kwds)
self=Counter() kwds={}
x1
__init__.py:660 update
657:         raise NotImplementedError(
658:             'Counter.fromkeys() is undefined.  Use Counter(iterable) instead.')
659: 
660:     def update(self, iterable=None, /, **kwds):
661:         '''Like dict.update() but add counts instead of replacing them.
662: 
663:         Source can be an iterable, a dictionary, or another Counter instance.
664: 
665:         >>> c = Counter('which')
666:         >>> c.update('witch')           # add elements from another iterable
667:         >>> d = Counter('watch')
668:         >>> c.update(d)                 # add elements from another counter
669:         >>> c['h']                      # four 'h' in which, witch, and watch
670:         4
671: 
672:         '''
673:         # The regular dict.update() operation makes no sense here because the
674:         # replace behavior results in the some of original untouched counts
675:         # being mixed-in with all of the other counts for a mismash that
676:         # doesn't have a straight-forward interpretation in most counting
677:         # contexts.  Instead, we implement straight-addition.  Both the inputs
678:         # and outputs are allowed to contain zero and negative counts.
679: 
680:         if iterable is not None:
681:             if isinstance(iterable, _collections_abc.Mapping):
682:                 if self:
683:                     self_get = self.get
684:                     for elem, count in iterable.items():
685:                         self[elem] = count + self_get(elem, 0)
686:                 else:
687:                     # fast path when counter is empty
688:                     super().update(iterable)
689:             else:
690:                 _count_elements(self, iterable)
691:         if kwds:
692:             self.update(kwds)
693: 
694:     def subtract(self, iterable=None, /, **kwds):
695:         '''Like dict.update() but subtracts counts instead of replacing them.
696:         Counts can be reduced below zero.  Both the inputs and outputs are
697:         allowed to contain zero and negative counts.
698: 
699:         Source can be an iterable, a dictionary, or another Counter instance.
700: 
701:         >>> c = Counter('which')
702:         >>> c.subtract('witch')             # subtract elements from another iterable
703:         >>> c.subtract(Counter('watch'))    # subtract elements from another counter
704:         >>> c['h']                          # 2 in which, minus 1 in witch, minus 1 in watch
705:         0
706:         >>> c['w']                          # 1 in which, minus 1 in witch, minus 1 in watch
707:         -1
708: 
709:         '''
710:         if iterable is not None:
711:             self_get = self.get
712:             if isinstance(iterable, _collections_abc.Mapping):
713:                 for elem, count in iterable.items():
714:                     self[elem] = self_get(elem, 0) - count
715:             else:
716:                 for elem in iterable:
717:                     self[elem] = self_get(elem, 0) - 1
718:         if kwds:
719:             self.subtract(kwds)
720: 
721:     def copy(self):
722:         'Return a shallow copy.'
723:         return self.__class__(self)
724: 
725:     def __reduce__(self):
726:         return self.__class__, (dict(self),)
727: 
728:     def __delitem__(self, elem):
729:         'Like dict.__delitem__() but does not raise KeyError for missing values.'
730:         if elem in self:
STACK [5]
x1
__init__.py:660
    def update(self, iterable=None, /, **kwds):
self=Counter() kwds={}
x1
__init__.py:680
        if iterable is not None:
self=Counter() kwds={}
x1
__init__.py:681
            if isinstance(iterable, _collections_abc.Mapping):
self=Counter() kwds={}
x1
<frozen abc>:117 __instancecheck__
STACK [6]
x1
<frozen abc>:117
x1
<frozen abc>:119
x1
<frozen abc>:121 __subclasscheck__
STACK [7]
x1
<frozen abc>:121
x1
<frozen abc>:123
x1
<frozen _collections_abc>:409 __subclasshook__
STACK [8]
x1
<frozen _collections_abc>:409
x1
<frozen _collections_abc>:411
x1
<frozen _collections_abc>:413
x1
413
return
 NotImplemented 
x2
<frozen abc>:121 __subclasscheck__
STACK [8]
x2
<frozen abc>:121
x2
<frozen abc>:123
x2
<frozen _collections_abc>:409 __subclasshook__
STACK [9]
x2
<frozen _collections_abc>:409
x2
<frozen _collections_abc>:411
x2
<frozen _collections_abc>:413
x3
413
return
 NotImplemented 
x4
<frozen abc>:121 __subclasscheck__
STACK [9]
x3
<frozen abc>:121
x3
<frozen abc>:123
x3
<frozen _collections_abc>:409 __subclasshook__
STACK [10]
x3
<frozen _collections_abc>:409
x3
<frozen _collections_abc>:411
x3
<frozen _collections_abc>:413
x5
413
return
 NotImplemented 
x6
123
return
 False 
x4
<frozen abc>:121 __subclasscheck__
STACK [9]
x4
<frozen abc>:121
x4
<frozen abc>:123
x5
<frozen _collections_abc>:409 __subclasshook__
STACK [10]
x4
<frozen _collections_abc>:409
x4
<frozen _collections_abc>:411
x4
<frozen _collections_abc>:413
x7
413
return
 NotImplemented 
x8
123
return
 False 
x6
<frozen abc>:121 __subclasscheck__
STACK [9]
x5
<frozen abc>:121
x5
<frozen abc>:123
x7
<frozen _collections_abc>:409 __subclasshook__
STACK [10]
x5
<frozen _collections_abc>:409
x5
<frozen _collections_abc>:411
x5
<frozen _collections_abc>:413
x9
413
return
 NotImplemented 
x10
123
return
 False 
x8
<frozen abc>:121 __subclasscheck__
STACK [9]
x6
<frozen abc>:121
x6
<frozen abc>:123
x9
<frozen _collections_abc>:409 __subclasshook__
STACK [10]
x6
<frozen _collections_abc>:409
x6
<frozen _collections_abc>:411
x6
<frozen _collections_abc>:413
x11
413
return
 NotImplemented 
x12
123
return
 False 
x10
<frozen abc>:121 __subclasscheck__
STACK [9]
x7
<frozen abc>:121
x7
<frozen abc>:123
x11
<frozen _collections_abc>:409 __subclasshook__
STACK [10]
x7
<frozen _collections_abc>:409
x7
<frozen _collections_abc>:411
x7
<frozen _collections_abc>:413
x13
413
return
 NotImplemented 
x14
123
return
 False 
x12
123
return
 False 
x13
<frozen abc>:121 __subclasscheck__
STACK [8]
x8
<frozen abc>:121
x8
<frozen abc>:123
x14
<frozen _collections_abc>:409 __subclasshook__
STACK [9]
x8
<frozen _collections_abc>:409
x8
<frozen _collections_abc>:411
x8
<frozen _collections_abc>:413
x15
413
return
 NotImplemented 
x16
123
return
 False 
x15
123
return
 False 
x16
119
return
 False 
x2
__init__.py:690
                _count_elements(self, iterable)
self=Counter() kwds={}
x1
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x2
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
x2
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
x3
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x1
conways_game_of_life.py:31
def neighbors(cell):
cell=(3, 1)
x1
conways_game_of_life.py:32
    return {
cell=(3, 1)
x1
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 1)
x1
conways_game_of_life.py:32
    return {
cell=(3, 1)
x2
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x3
conways_game_of_life.py:32
    return {
cell=(3, 1)
x3
conways_game_of_life.py:32
    return {
cell=(3, 1)
x4
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 1)
x2
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=-1
x1
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=-1
x5
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=-1
x2
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=-1 dy=-1
x1
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=-1 dy=-1
x1
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=-1 dy=-1
x2
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=-1 dy=-1
x6
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=-1 dy=-1
x3
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=-1 dy=0
x3
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=-1 dy=0
x2
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=-1 dy=0
x4
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=-1 dy=0
x7
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=-1 dy=0
x4
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=-1 dy=1
x5
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=-1 dy=1
x3
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=-1 dy=1
x6
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=-1 dy=1
x8
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=-1 dy=1
x7
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=-1 dy=1
x9
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 1) dx=-1 dy=1
x3
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=0 dy=1
x5
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=0 dy=1
x10
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=0 dy=1
x6
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=0 dy=-1
x8
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=0 dy=-1
x4
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=0 dy=-1
x9
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=0 dy=-1
x11
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=0 dy=-1
x7
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=0 dy=0
x10
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=0 dy=0
x12
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=0 dy=0
x8
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=0 dy=1
x11
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=0 dy=1
x5
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=0 dy=1
x12
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=0 dy=1
x13
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=0 dy=1
x13
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=0 dy=1
x14
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 1) dx=0 dy=1
x4
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=1 dy=1
x9
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=1 dy=1
x15
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=1 dy=1
x10
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=-1
x14
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=1 dy=-1
x6
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=-1
x15
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=1 dy=-1
x16
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=1 dy=-1
x11
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=0
x16
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=1 dy=0
x7
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=0
x17
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=1 dy=0
x17
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 1) dx=1 dy=0
x12
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=1
x18
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 1) dx=1 dy=1
x8
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=1
x19
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=1 dy=1
x18
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=1
x20
conways_game_of_life.py:32
    return {
cell=(3, 1) dx=1 dy=1
x19
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 1) dx=1 dy=1
x21
36
return
 {(4, 0), (2, 1), (2, 0), (4, 2), (3, 0), (2, 2), (3, 2), (4, 1)} 
cell=(3, 1) dx=1 dy=1
x22
32
return
 {(4, 0), (2, 1), (2, 0), (4, 2), (3, 0), (2, 2), (3, 2), (4, 1)} 
cell=(3, 1)
x20
29
return
 (4, 0) 
cell=(3, 1) neighbor=(4, 0)
x4
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x5
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(4, 0)
x5
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(4, 0)
x6
29
return
 (2, 1) 
cell=(3, 1) neighbor=(2, 1)
x7
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x8
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(2, 1)
x8
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(2, 1)
x9
29
return
 (2, 0) 
cell=(3, 1) neighbor=(2, 0)
x10
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x11
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(2, 0)
x11
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(2, 0)
x12
29
return
 (4, 2) 
cell=(3, 1) neighbor=(4, 2)
x13
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x14
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(4, 2)
x14
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(4, 2)
x15
29
return
 (3, 0) 
cell=(3, 1) neighbor=(3, 0)
x16
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x17
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(3, 0)
x17
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(3, 0)
x18
29
return
 (2, 2) 
cell=(3, 1) neighbor=(2, 2)
x19
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x20
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(2, 2)
x20
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(2, 2)
x21
29
return
 (3, 2) 
cell=(3, 1) neighbor=(3, 2)
x22
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x23
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(3, 2)
x23
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(3, 2)
x24
29
return
 (4, 1) 
cell=(3, 1) neighbor=(4, 1)
x25
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x26
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(4, 1)
x26
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(4, 1)
x27
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 1) neighbor=(4, 1)
x28
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x2
conways_game_of_life.py:31
def neighbors(cell):
cell=(5, 4)
x2
conways_game_of_life.py:32
    return {
cell=(5, 4)
x21
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(5, 4)
x5
conways_game_of_life.py:32
    return {
cell=(5, 4)
x22
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x23
conways_game_of_life.py:32
    return {
cell=(5, 4)
x23
conways_game_of_life.py:32
    return {
cell=(5, 4)
x24
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(5, 4)
x6
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=-1
x13
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=-1
x25
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=-1
x14
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=-1 dy=-1
x23
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=-1 dy=-1
x9
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=-1 dy=-1
x24
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=-1 dy=-1
x26
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=-1 dy=-1
x15
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=-1 dy=0
x25
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=-1 dy=0
x10
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=-1 dy=0
x26
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=-1 dy=0
x27
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=-1 dy=0
x16
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=-1 dy=1
x27
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=-1 dy=1
x11
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=-1 dy=1
x28
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=-1 dy=1
x28
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=-1 dy=1
x29
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=-1 dy=1
x29
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(5, 4) dx=-1 dy=1
x7
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=0 dy=1
x17
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=0 dy=1
x30
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=0 dy=1
x18
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=0 dy=-1
x30
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=0 dy=-1
x12
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=0 dy=-1
x31
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=0 dy=-1
x31
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=0 dy=-1
x19
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=0 dy=0
x32
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=0 dy=0
x32
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=0 dy=0
x20
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=0 dy=1
x33
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=0 dy=1
x13
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=0 dy=1
x34
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=0 dy=1
x33
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=0 dy=1
x35
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=0 dy=1
x34
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(5, 4) dx=0 dy=1
x8
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=1 dy=1
x21
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=1 dy=1
x35
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=1 dy=1
x22
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=-1
x36
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=1 dy=-1
x14
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=-1
x37
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=1 dy=-1
x36
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=1 dy=-1
x23
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=0
x38
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=1 dy=0
x15
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=0
x39
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=1 dy=0
x37
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(5, 4) dx=1 dy=0
x24
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=1
x40
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(5, 4) dx=1 dy=1
x16
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=1
x41
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=1 dy=1
x38
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=1
x42
conways_game_of_life.py:32
    return {
cell=(5, 4) dx=1 dy=1
x39
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(5, 4) dx=1 dy=1
x43
36
return
 {(4, 4), (5, 5), (6, 5), (4, 3), (6, 4), (4, 5), (5, 3), (6, 3)} 
cell=(5, 4) dx=1 dy=1
x44
32
return
 {(4, 4), (5, 5), (6, 5), (4, 3), (6, 4), (4, 5), (5, 3), (6, 3)} 
cell=(5, 4)
x40
29
return
 (4, 4) 
cell=(5, 4) neighbor=(4, 4)
x29
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x30
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(4, 4)
x30
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(4, 4)
x31
29
return
 (5, 5) 
cell=(5, 4) neighbor=(5, 5)
x32
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x33
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(5, 5)
x33
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(5, 5)
x34
29
return
 (6, 5) 
cell=(5, 4) neighbor=(6, 5)
x35
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x36
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(6, 5)
x36
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(6, 5)
x37
29
return
 (4, 3) 
cell=(5, 4) neighbor=(4, 3)
x38
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x39
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(4, 3)
x39
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(4, 3)
x40
29
return
 (6, 4) 
cell=(5, 4) neighbor=(6, 4)
x41
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x42
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(6, 4)
x42
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(6, 4)
x43
29
return
 (4, 5) 
cell=(5, 4) neighbor=(4, 5)
x44
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x45
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(4, 5)
x45
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(4, 5)
x46
29
return
 (5, 3) 
cell=(5, 4) neighbor=(5, 3)
x47
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x48
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(5, 3)
x48
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(5, 3)
x49
29
return
 (6, 3) 
cell=(5, 4) neighbor=(6, 3)
x50
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x51
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(6, 3)
x51
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(6, 3)
x52
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(5, 4) neighbor=(6, 3)
x53
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x3
conways_game_of_life.py:31
def neighbors(cell):
cell=(8, 0)
x3
conways_game_of_life.py:32
    return {
cell=(8, 0)
x41
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 0)
x9
conways_game_of_life.py:32
    return {
cell=(8, 0)
x42
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x43
conways_game_of_life.py:32
    return {
cell=(8, 0)
x43
conways_game_of_life.py:32
    return {
cell=(8, 0)
x44
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 0)
x10
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=-1
x25
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=-1
x45
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=-1
x26
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=-1 dy=-1
x45
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=-1 dy=-1
x17
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=-1 dy=-1
x46
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=-1 dy=-1
x46
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=-1 dy=-1
x27
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=-1 dy=0
x47
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=-1 dy=0
x18
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=-1 dy=0
x48
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=-1 dy=0
x47
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=-1 dy=0
x28
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=-1 dy=1
x49
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=-1 dy=1
x19
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=-1 dy=1
x50
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=-1 dy=1
x48
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=-1 dy=1
x51
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=-1 dy=1
x49
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 0) dx=-1 dy=1
x11
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=0 dy=1
x29
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=0 dy=1
x50
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=0 dy=1
x30
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=0 dy=-1
x52
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=0 dy=-1
x20
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=0 dy=-1
x53
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=0 dy=-1
x51
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=0 dy=-1
x31
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=0 dy=0
x54
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=0 dy=0
x52
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=0 dy=0
x32
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=0 dy=1
x55
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=0 dy=1
x21
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=0 dy=1
x56
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=0 dy=1
x53
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=0 dy=1
x57
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=0 dy=1
x54
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 0) dx=0 dy=1
x12
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=1 dy=1
x33
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=1 dy=1
x55
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=1 dy=1
x34
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=-1
x58
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=1 dy=-1
x22
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=-1
x59
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=1 dy=-1
x56
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=1 dy=-1
x35
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=0
x60
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=1 dy=0
x23
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=0
x61
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=1 dy=0
x57
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 0) dx=1 dy=0
x36
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=1
x62
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 0) dx=1 dy=1
x24
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=1
x63
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=1 dy=1
x58
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=1
x64
conways_game_of_life.py:32
    return {
cell=(8, 0) dx=1 dy=1
x59
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 0) dx=1 dy=1
x65
36
return
 {(7, -1), (9, 0), (8, -1), (7, 1), (8, 1), (7, 0), (9, -1), (9, 1)} 
cell=(8, 0) dx=1 dy=1
x66
32
return
 {(7, -1), (9, 0), (8, -1), (7, 1), (8, 1), (7, 0), (9, -1), (9, 1)} 
cell=(8, 0)
x60
29
return
 (7, -1) 
cell=(8, 0) neighbor=(7, -1)
x54
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x55
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(7, -1)
x55
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(7, -1)
x56
29
return
 (9, 0) 
cell=(8, 0) neighbor=(9, 0)
x57
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x58
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(9, 0)
x58
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(9, 0)
x59
29
return
 (8, -1) 
cell=(8, 0) neighbor=(8, -1)
x60
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x61
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(8, -1)
x61
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(8, -1)
x62
29
return
 (7, 1) 
cell=(8, 0) neighbor=(7, 1)
x63
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x64
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(7, 1)
x64
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(7, 1)
x65
29
return
 (8, 1) 
cell=(8, 0) neighbor=(8, 1)
x66
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x67
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(8, 1)
x67
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(8, 1)
x68
29
return
 (7, 0) 
cell=(8, 0) neighbor=(7, 0)
x69
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x70
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(7, 0)
x70
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(7, 0)
x71
29
return
 (9, -1) 
cell=(8, 0) neighbor=(9, -1)
x72
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x73
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(9, -1)
x73
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(9, -1)
x74
29
return
 (9, 1) 
cell=(8, 0) neighbor=(9, 1)
x75
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x76
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(9, 1)
x76
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(9, 1)
x77
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 0) neighbor=(9, 1)
x78
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x4
conways_game_of_life.py:31
def neighbors(cell):
cell=(8, 6)
x4
conways_game_of_life.py:32
    return {
cell=(8, 6)
x61
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 6)
x13
conways_game_of_life.py:32
    return {
cell=(8, 6)
x62
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x63
conways_game_of_life.py:32
    return {
cell=(8, 6)
x63
conways_game_of_life.py:32
    return {
cell=(8, 6)
x64
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 6)
x14
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=-1
x37
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=-1
x65
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=-1
x38
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=-1 dy=-1
x67
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=-1 dy=-1
x25
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=-1 dy=-1
x68
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=-1 dy=-1
x66
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=-1 dy=-1
x39
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=-1 dy=0
x69
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=-1 dy=0
x26
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=-1 dy=0
x70
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=-1 dy=0
x67
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=-1 dy=0
x40
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=-1 dy=1
x71
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=-1 dy=1
x27
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=-1 dy=1
x72
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=-1 dy=1
x68
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=-1 dy=1
x73
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=-1 dy=1
x69
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 6) dx=-1 dy=1
x15
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=0 dy=1
x41
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=0 dy=1
x70
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=0 dy=1
x42
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=0 dy=-1
x74
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=0 dy=-1
x28
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=0 dy=-1
x75
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=0 dy=-1
x71
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=0 dy=-1
x43
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=0 dy=0
x76
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=0 dy=0
x72
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=0 dy=0
x44
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=0 dy=1
x77
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=0 dy=1
x29
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=0 dy=1
x78
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=0 dy=1
x73
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=0 dy=1
x79
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=0 dy=1
x74
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 6) dx=0 dy=1
x16
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=1 dy=1
x45
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=1 dy=1
x75
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=1 dy=1
x46
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=-1
x80
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=1 dy=-1
x30
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=-1
x81
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=1 dy=-1
x76
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=1 dy=-1
x47
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=0
x82
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=1 dy=0
x31
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=0
x83
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=1 dy=0
x77
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 6) dx=1 dy=0
x48
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=1
x84
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 6) dx=1 dy=1
x32
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=1
x85
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=1 dy=1
x78
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=1
x86
conways_game_of_life.py:32
    return {
cell=(8, 6) dx=1 dy=1
x79
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 6) dx=1 dy=1
x87
36
return
 {(7, 7), (8, 7), (9, 6), (9, 5), (7, 6), (7, 5), (9, 7), (8, 5)} 
cell=(8, 6) dx=1 dy=1
x88
32
return
 {(7, 7), (8, 7), (9, 6), (9, 5), (7, 6), (7, 5), (9, 7), (8, 5)} 
cell=(8, 6)
x80
29
return
 (7, 7) 
cell=(8, 6) neighbor=(7, 7)
x79
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x80
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(7, 7)
x80
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(7, 7)
x81
29
return
 (8, 7) 
cell=(8, 6) neighbor=(8, 7)
x82
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x83
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(8, 7)
x83
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(8, 7)
x84
29
return
 (9, 6) 
cell=(8, 6) neighbor=(9, 6)
x85
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x86
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(9, 6)
x86
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(9, 6)
x87
29
return
 (9, 5) 
cell=(8, 6) neighbor=(9, 5)
x88
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x89
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(9, 5)
x89
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(9, 5)
x90
29
return
 (7, 6) 
cell=(8, 6) neighbor=(7, 6)
x91
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x92
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(7, 6)
x92
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(7, 6)
x93
29
return
 (7, 5) 
cell=(8, 6) neighbor=(7, 5)
x94
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x95
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(7, 5)
x95
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(7, 5)
x96
29
return
 (9, 7) 
cell=(8, 6) neighbor=(9, 7)
x97
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x98
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(9, 7)
x98
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(9, 7)
x99
29
return
 (8, 5) 
cell=(8, 6) neighbor=(8, 5)
x100
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x101
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(8, 5)
x101
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(8, 5)
x102
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 6) neighbor=(8, 5)
x103
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x5
conways_game_of_life.py:31
def neighbors(cell):
cell=(2, 2)
x5
conways_game_of_life.py:32
    return {
cell=(2, 2)
x81
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 2)
x17
conways_game_of_life.py:32
    return {
cell=(2, 2)
x82
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x83
conways_game_of_life.py:32
    return {
cell=(2, 2)
x83
conways_game_of_life.py:32
    return {
cell=(2, 2)
x84
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 2)
x18
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=-1
x49
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=-1
x85
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=-1
x50
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=-1 dy=-1
x89
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=-1 dy=-1
x33
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=-1 dy=-1
x90
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=-1 dy=-1
x86
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=-1 dy=-1
x51
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=-1 dy=0
x91
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=-1 dy=0
x34
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=-1 dy=0
x92
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=-1 dy=0
x87
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=-1 dy=0
x52
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=-1 dy=1
x93
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=-1 dy=1
x35
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=-1 dy=1
x94
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=-1 dy=1
x88
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=-1 dy=1
x95
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=-1 dy=1
x89
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 2) dx=-1 dy=1
x19
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=0 dy=1
x53
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=0 dy=1
x90
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=0 dy=1
x54
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=0 dy=-1
x96
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=0 dy=-1
x36
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=0 dy=-1
x97
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=0 dy=-1
x91
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=0 dy=-1
x55
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=0 dy=0
x98
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=0 dy=0
x92
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=0 dy=0
x56
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=0 dy=1
x99
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=0 dy=1
x37
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=0 dy=1
x100
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=0 dy=1
x93
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=0 dy=1
x101
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=0 dy=1
x94
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 2) dx=0 dy=1
x20
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=1 dy=1
x57
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=1 dy=1
x95
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=1 dy=1
x58
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=-1
x102
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=1 dy=-1
x38
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=-1
x103
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=1 dy=-1
x96
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=1 dy=-1
x59
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=0
x104
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=1 dy=0
x39
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=0
x105
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=1 dy=0
x97
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 2) dx=1 dy=0
x60
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=1
x106
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 2) dx=1 dy=1
x40
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=1
x107
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=1 dy=1
x98
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=1
x108
conways_game_of_life.py:32
    return {
cell=(2, 2) dx=1 dy=1
x99
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 2) dx=1 dy=1
x109
36
return
 {(1, 2), (2, 1), (3, 1), (1, 1), (2, 3), (3, 3), (3, 2), (1, 3)} 
cell=(2, 2) dx=1 dy=1
x110
32
return
 {(1, 2), (2, 1), (3, 1), (1, 1), (2, 3), (3, 3), (3, 2), (1, 3)} 
cell=(2, 2)
x100
29
return
 (1, 2) 
cell=(2, 2) neighbor=(1, 2)
x104
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x105
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(1, 2)
x105
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(1, 2)
x106
29
return
 (2, 1) 
cell=(2, 2) neighbor=(2, 1)
x107
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x108
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(2, 1)
x108
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(2, 1)
x109
29
return
 (3, 1) 
cell=(2, 2) neighbor=(3, 1)
x110
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x111
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(3, 1)
x111
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(3, 1)
x112
29
return
 (1, 1) 
cell=(2, 2) neighbor=(1, 1)
x113
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x114
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(1, 1)
x114
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(1, 1)
x115
29
return
 (2, 3) 
cell=(2, 2) neighbor=(2, 3)
x116
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x117
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(2, 3)
x117
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(2, 3)
x118
29
return
 (3, 3) 
cell=(2, 2) neighbor=(3, 3)
x119
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x120
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(3, 3)
x120
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(3, 3)
x121
29
return
 (3, 2) 
cell=(2, 2) neighbor=(3, 2)
x122
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x123
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(3, 2)
x123
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(3, 2)
x124
29
return
 (1, 3) 
cell=(2, 2) neighbor=(1, 3)
x125
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x126
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(1, 3)
x126
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(1, 3)
x127
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 2) neighbor=(1, 3)
x128
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x6
conways_game_of_life.py:31
def neighbors(cell):
cell=(1, 6)
x6
conways_game_of_life.py:32
    return {
cell=(1, 6)
x101
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(1, 6)
x21
conways_game_of_life.py:32
    return {
cell=(1, 6)
x102
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x103
conways_game_of_life.py:32
    return {
cell=(1, 6)
x103
conways_game_of_life.py:32
    return {
cell=(1, 6)
x104
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(1, 6)
x22
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=-1
x61
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=-1
x105
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=-1
x62
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=-1 dy=-1
x111
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=-1 dy=-1
x41
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=-1 dy=-1
x112
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=-1 dy=-1
x106
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=-1 dy=-1
x63
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=-1 dy=0
x113
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=-1 dy=0
x42
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=-1 dy=0
x114
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=-1 dy=0
x107
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=-1 dy=0
x64
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=-1 dy=1
x115
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=-1 dy=1
x43
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=-1 dy=1
x116
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=-1 dy=1
x108
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=-1 dy=1
x117
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=-1 dy=1
x109
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(1, 6) dx=-1 dy=1
x23
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=0 dy=1
x65
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=0 dy=1
x110
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=0 dy=1
x66
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=0 dy=-1
x118
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=0 dy=-1
x44
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=0 dy=-1
x119
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=0 dy=-1
x111
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=0 dy=-1
x67
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=0 dy=0
x120
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=0 dy=0
x112
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=0 dy=0
x68
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=0 dy=1
x121
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=0 dy=1
x45
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=0 dy=1
x122
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=0 dy=1
x113
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=0 dy=1
x123
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=0 dy=1
x114
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(1, 6) dx=0 dy=1
x24
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=1 dy=1
x69
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=1 dy=1
x115
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=1 dy=1
x70
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=-1
x124
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=1 dy=-1
x46
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=-1
x125
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=1 dy=-1
x116
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=1 dy=-1
x71
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=0
x126
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=1 dy=0
x47
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=0
x127
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=1 dy=0
x117
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(1, 6) dx=1 dy=0
x72
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=1
x128
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(1, 6) dx=1 dy=1
x48
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=1
x129
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=1 dy=1
x118
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=1
x130
conways_game_of_life.py:32
    return {
cell=(1, 6) dx=1 dy=1
x119
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(1, 6) dx=1 dy=1
x131
36
return
 {(0, 7), (2, 7), (1, 5), (0, 6), (1, 7), (2, 6), (0, 5), (2, 5)} 
cell=(1, 6) dx=1 dy=1
x132
32
return
 {(0, 7), (2, 7), (1, 5), (0, 6), (1, 7), (2, 6), (0, 5), (2, 5)} 
cell=(1, 6)
x120
29
return
 (0, 7) 
cell=(1, 6) neighbor=(0, 7)
x129
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x130
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(0, 7)
x130
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(0, 7)
x131
29
return
 (2, 7) 
cell=(1, 6) neighbor=(2, 7)
x132
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x133
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(2, 7)
x133
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(2, 7)
x134
29
return
 (1, 5) 
cell=(1, 6) neighbor=(1, 5)
x135
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x136
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(1, 5)
x136
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(1, 5)
x137
29
return
 (0, 6) 
cell=(1, 6) neighbor=(0, 6)
x138
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x139
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(0, 6)
x139
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(0, 6)
x140
29
return
 (1, 7) 
cell=(1, 6) neighbor=(1, 7)
x141
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x142
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(1, 7)
x142
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(1, 7)
x143
29
return
 (2, 6) 
cell=(1, 6) neighbor=(2, 6)
x144
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x145
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(2, 6)
x145
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(2, 6)
x146
29
return
 (0, 5) 
cell=(1, 6) neighbor=(0, 5)
x147
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x148
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(0, 5)
x148
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(0, 5)
x149
29
return
 (2, 5) 
cell=(1, 6) neighbor=(2, 5)
x150
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x151
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(2, 5)
x151
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(2, 5)
x152
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(1, 6) neighbor=(2, 5)
x153
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x7
conways_game_of_life.py:31
def neighbors(cell):
cell=(4, 2)
x7
conways_game_of_life.py:32
    return {
cell=(4, 2)
x121
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(4, 2)
x25
conways_game_of_life.py:32
    return {
cell=(4, 2)
x122
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x123
conways_game_of_life.py:32
    return {
cell=(4, 2)
x123
conways_game_of_life.py:32
    return {
cell=(4, 2)
x124
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(4, 2)
x26
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=-1
x73
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=-1
x125
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=-1
x74
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=-1 dy=-1
x133
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=-1 dy=-1
x49
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=-1 dy=-1
x134
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=-1 dy=-1
x126
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=-1 dy=-1
x75
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=-1 dy=0
x135
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=-1 dy=0
x50
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=-1 dy=0
x136
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=-1 dy=0
x127
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=-1 dy=0
x76
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=-1 dy=1
x137
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=-1 dy=1
x51
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=-1 dy=1
x138
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=-1 dy=1
x128
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=-1 dy=1
x139
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=-1 dy=1
x129
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(4, 2) dx=-1 dy=1
x27
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=0 dy=1
x77
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=0 dy=1
x130
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=0 dy=1
x78
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=0 dy=-1
x140
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=0 dy=-1
x52
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=0 dy=-1
x141
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=0 dy=-1
x131
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=0 dy=-1
x79
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=0 dy=0
x142
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=0 dy=0
x132
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=0 dy=0
x80
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=0 dy=1
x143
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=0 dy=1
x53
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=0 dy=1
x144
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=0 dy=1
x133
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=0 dy=1
x145
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=0 dy=1
x134
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(4, 2) dx=0 dy=1
x28
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=1 dy=1
x81
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=1 dy=1
x135
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=1 dy=1
x82
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=-1
x146
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=1 dy=-1
x54
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=-1
x147
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=1 dy=-1
x136
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=1 dy=-1
x83
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=0
x148
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=1 dy=0
x55
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=0
x149
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=1 dy=0
x137
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(4, 2) dx=1 dy=0
x84
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=1
x150
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(4, 2) dx=1 dy=1
x56
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=1
x151
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=1 dy=1
x138
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=1
x152
conways_game_of_life.py:32
    return {
cell=(4, 2) dx=1 dy=1
x139
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(4, 2) dx=1 dy=1
x153
36
return
 {(4, 3), (3, 1), (5, 1), (3, 3), (5, 3), (3, 2), (4, 1), (5, 2)} 
cell=(4, 2) dx=1 dy=1
x154
32
return
 {(4, 3), (3, 1), (5, 1), (3, 3), (5, 3), (3, 2), (4, 1), (5, 2)} 
cell=(4, 2)
x140
29
return
 (4, 3) 
cell=(4, 2) neighbor=(4, 3)
x154
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x155
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(4, 3)
x155
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(4, 3)
x156
29
return
 (3, 1) 
cell=(4, 2) neighbor=(3, 1)
x157
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x158
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(3, 1)
x158
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(3, 1)
x159
29
return
 (5, 1) 
cell=(4, 2) neighbor=(5, 1)
x160
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x161
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(5, 1)
x161
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(5, 1)
x162
29
return
 (3, 3) 
cell=(4, 2) neighbor=(3, 3)
x163
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x164
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(3, 3)
x164
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(3, 3)
x165
29
return
 (5, 3) 
cell=(4, 2) neighbor=(5, 3)
x166
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x167
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(5, 3)
x167
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(5, 3)
x168
29
return
 (3, 2) 
cell=(4, 2) neighbor=(3, 2)
x169
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x170
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(3, 2)
x170
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(3, 2)
x171
29
return
 (4, 1) 
cell=(4, 2) neighbor=(4, 1)
x172
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x173
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(4, 1)
x173
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(4, 1)
x174
29
return
 (5, 2) 
cell=(4, 2) neighbor=(5, 2)
x175
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x176
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(5, 2)
x176
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(5, 2)
x177
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(4, 2) neighbor=(5, 2)
x178
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x8
conways_game_of_life.py:31
def neighbors(cell):
cell=(8, 2)
x8
conways_game_of_life.py:32
    return {
cell=(8, 2)
x141
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 2)
x29
conways_game_of_life.py:32
    return {
cell=(8, 2)
x142
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x143
conways_game_of_life.py:32
    return {
cell=(8, 2)
x143
conways_game_of_life.py:32
    return {
cell=(8, 2)
x144
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 2)
x30
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=-1
x85
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=-1
x145
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=-1
x86
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=-1 dy=-1
x155
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=-1 dy=-1
x57
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=-1 dy=-1
x156
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=-1 dy=-1
x146
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=-1 dy=-1
x87
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=-1 dy=0
x157
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=-1 dy=0
x58
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=-1 dy=0
x158
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=-1 dy=0
x147
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=-1 dy=0
x88
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=-1 dy=1
x159
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=-1 dy=1
x59
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=-1 dy=1
x160
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=-1 dy=1
x148
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=-1 dy=1
x161
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=-1 dy=1
x149
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 2) dx=-1 dy=1
x31
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=0 dy=1
x89
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=0 dy=1
x150
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=0 dy=1
x90
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=0 dy=-1
x162
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=0 dy=-1
x60
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=0 dy=-1
x163
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=0 dy=-1
x151
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=0 dy=-1
x91
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=0 dy=0
x164
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=0 dy=0
x152
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=0 dy=0
x92
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=0 dy=1
x165
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=0 dy=1
x61
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=0 dy=1
x166
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=0 dy=1
x153
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=0 dy=1
x167
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=0 dy=1
x154
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 2) dx=0 dy=1
x32
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=1 dy=1
x93
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=1 dy=1
x155
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=1 dy=1
x94
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=-1
x168
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=1 dy=-1
x62
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=-1
x169
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=1 dy=-1
x156
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=1 dy=-1
x95
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=0
x170
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=1 dy=0
x63
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=0
x171
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=1 dy=0
x157
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 2) dx=1 dy=0
x96
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=1
x172
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 2) dx=1 dy=1
x64
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=1
x173
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=1 dy=1
x158
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=1
x174
conways_game_of_life.py:32
    return {
cell=(8, 2) dx=1 dy=1
x159
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 2) dx=1 dy=1
x175
36
return
 {(7, 1), (9, 3), (8, 1), (9, 2), (7, 3), (8, 3), (7, 2), (9, 1)} 
cell=(8, 2) dx=1 dy=1
x176
32
return
 {(7, 1), (9, 3), (8, 1), (9, 2), (7, 3), (8, 3), (7, 2), (9, 1)} 
cell=(8, 2)
x160
29
return
 (7, 1) 
cell=(8, 2) neighbor=(7, 1)
x179
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x180
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(7, 1)
x180
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(7, 1)
x181
29
return
 (9, 3) 
cell=(8, 2) neighbor=(9, 3)
x182
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x183
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(9, 3)
x183
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(9, 3)
x184
29
return
 (8, 1) 
cell=(8, 2) neighbor=(8, 1)
x185
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x186
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(8, 1)
x186
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(8, 1)
x187
29
return
 (9, 2) 
cell=(8, 2) neighbor=(9, 2)
x188
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x189
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(9, 2)
x189
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(9, 2)
x190
29
return
 (7, 3) 
cell=(8, 2) neighbor=(7, 3)
x191
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x192
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(7, 3)
x192
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(7, 3)
x193
29
return
 (8, 3) 
cell=(8, 2) neighbor=(8, 3)
x194
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x195
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(8, 3)
x195
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(8, 3)
x196
29
return
 (7, 2) 
cell=(8, 2) neighbor=(7, 2)
x197
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x198
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(7, 2)
x198
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(7, 2)
x199
29
return
 (9, 1) 
cell=(8, 2) neighbor=(9, 1)
x200
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x201
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(9, 1)
x201
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(9, 1)
x202
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 2) neighbor=(9, 1)
x203
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x9
conways_game_of_life.py:31
def neighbors(cell):
cell=(8, 8)
x9
conways_game_of_life.py:32
    return {
cell=(8, 8)
x161
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 8)
x33
conways_game_of_life.py:32
    return {
cell=(8, 8)
x162
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x163
conways_game_of_life.py:32
    return {
cell=(8, 8)
x163
conways_game_of_life.py:32
    return {
cell=(8, 8)
x164
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 8)
x34
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=-1
x97
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=-1
x165
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=-1
x98
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=-1 dy=-1
x177
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=-1 dy=-1
x65
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=-1 dy=-1
x178
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=-1 dy=-1
x166
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=-1 dy=-1
x99
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=-1 dy=0
x179
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=-1 dy=0
x66
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=-1 dy=0
x180
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=-1 dy=0
x167
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=-1 dy=0
x100
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=-1 dy=1
x181
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=-1 dy=1
x67
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=-1 dy=1
x182
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=-1 dy=1
x168
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=-1 dy=1
x183
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=-1 dy=1
x169
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 8) dx=-1 dy=1
x35
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=0 dy=1
x101
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=0 dy=1
x170
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=0 dy=1
x102
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=0 dy=-1
x184
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=0 dy=-1
x68
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=0 dy=-1
x185
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=0 dy=-1
x171
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=0 dy=-1
x103
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=0 dy=0
x186
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=0 dy=0
x172
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=0 dy=0
x104
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=0 dy=1
x187
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=0 dy=1
x69
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=0 dy=1
x188
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=0 dy=1
x173
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=0 dy=1
x189
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=0 dy=1
x174
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(8, 8) dx=0 dy=1
x36
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=1 dy=1
x105
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=1 dy=1
x175
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=1 dy=1
x106
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=-1
x190
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=1 dy=-1
x70
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=-1
x191
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=1 dy=-1
x176
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=1 dy=-1
x107
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=0
x192
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=1 dy=0
x71
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=0
x193
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=1 dy=0
x177
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(8, 8) dx=1 dy=0
x108
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=1
x194
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(8, 8) dx=1 dy=1
x72
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=1
x195
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=1 dy=1
x178
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=1
x196
conways_game_of_life.py:32
    return {
cell=(8, 8) dx=1 dy=1
x179
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(8, 8) dx=1 dy=1
x197
36
return
 {(7, 7), (9, 9), (8, 7), (7, 9), (8, 9), (9, 8), (9, 7), (7, 8)} 
cell=(8, 8) dx=1 dy=1
x198
32
return
 {(7, 7), (9, 9), (8, 7), (7, 9), (8, 9), (9, 8), (9, 7), (7, 8)} 
cell=(8, 8)
x180
29
return
 (7, 7) 
cell=(8, 8) neighbor=(7, 7)
x204
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x205
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(7, 7)
x205
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(7, 7)
x206
29
return
 (9, 9) 
cell=(8, 8) neighbor=(9, 9)
x207
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x208
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(9, 9)
x208
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(9, 9)
x209
29
return
 (8, 7) 
cell=(8, 8) neighbor=(8, 7)
x210
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x211
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(8, 7)
x211
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(8, 7)
x212
29
return
 (7, 9) 
cell=(8, 8) neighbor=(7, 9)
x213
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x214
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(7, 9)
x214
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(7, 9)
x215
29
return
 (8, 9) 
cell=(8, 8) neighbor=(8, 9)
x216
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x217
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(8, 9)
x217
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(8, 9)
x218
29
return
 (9, 8) 
cell=(8, 8) neighbor=(9, 8)
x219
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x220
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(9, 8)
x220
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(9, 8)
x221
29
return
 (9, 7) 
cell=(8, 8) neighbor=(9, 7)
x222
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x223
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(9, 7)
x223
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(9, 7)
x224
29
return
 (7, 8) 
cell=(8, 8) neighbor=(7, 8)
x225
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x226
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(7, 8)
x226
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(7, 8)
x227
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(8, 8) neighbor=(7, 8)
x228
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x10
conways_game_of_life.py:31
def neighbors(cell):
cell=(6, 1)
x10
conways_game_of_life.py:32
    return {
cell=(6, 1)
x181
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 1)
x37
conways_game_of_life.py:32
    return {
cell=(6, 1)
x182
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x183
conways_game_of_life.py:32
    return {
cell=(6, 1)
x183
conways_game_of_life.py:32
    return {
cell=(6, 1)
x184
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 1)
x38
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=-1
x109
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=-1
x185
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=-1
x110
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=-1 dy=-1
x199
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=-1 dy=-1
x73
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=-1 dy=-1
x200
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=-1 dy=-1
x186
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=-1 dy=-1
x111
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=-1 dy=0
x201
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=-1 dy=0
x74
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=-1 dy=0
x202
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=-1 dy=0
x187
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=-1 dy=0
x112
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=-1 dy=1
x203
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=-1 dy=1
x75
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=-1 dy=1
x204
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=-1 dy=1
x188
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=-1 dy=1
x205
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=-1 dy=1
x189
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 1) dx=-1 dy=1
x39
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=0 dy=1
x113
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=0 dy=1
x190
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=0 dy=1
x114
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=0 dy=-1
x206
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=0 dy=-1
x76
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=0 dy=-1
x207
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=0 dy=-1
x191
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=0 dy=-1
x115
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=0 dy=0
x208
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=0 dy=0
x192
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=0 dy=0
x116
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=0 dy=1
x209
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=0 dy=1
x77
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=0 dy=1
x210
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=0 dy=1
x193
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=0 dy=1
x211
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=0 dy=1
x194
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 1) dx=0 dy=1
x40
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=1 dy=1
x117
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=1 dy=1
x195
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=1 dy=1
x118
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=-1
x212
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=1 dy=-1
x78
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=-1
x213
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=1 dy=-1
x196
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=1 dy=-1
x119
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=0
x214
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=1 dy=0
x79
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=0
x215
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=1 dy=0
x197
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 1) dx=1 dy=0
x120
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=1
x216
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 1) dx=1 dy=1
x80
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=1
x217
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=1 dy=1
x198
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=1
x218
conways_game_of_life.py:32
    return {
cell=(6, 1) dx=1 dy=1
x199
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 1) dx=1 dy=1
x219
36
return
 {(6, 2), (7, 1), (7, 0), (5, 1), (5, 0), (7, 2), (6, 0), (5, 2)} 
cell=(6, 1) dx=1 dy=1
x220
32
return
 {(6, 2), (7, 1), (7, 0), (5, 1), (5, 0), (7, 2), (6, 0), (5, 2)} 
cell=(6, 1)
x200
29
return
 (6, 2) 
cell=(6, 1) neighbor=(6, 2)
x229
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x230
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(6, 2)
x230
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(6, 2)
x231
29
return
 (7, 1) 
cell=(6, 1) neighbor=(7, 1)
x232
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x233
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(7, 1)
x233
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(7, 1)
x234
29
return
 (7, 0) 
cell=(6, 1) neighbor=(7, 0)
x235
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x236
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(7, 0)
x236
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(7, 0)
x237
29
return
 (5, 1) 
cell=(6, 1) neighbor=(5, 1)
x238
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x239
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(5, 1)
x239
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(5, 1)
x240
29
return
 (5, 0) 
cell=(6, 1) neighbor=(5, 0)
x241
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x242
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(5, 0)
x242
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(5, 0)
x243
29
return
 (7, 2) 
cell=(6, 1) neighbor=(7, 2)
x244
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x245
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(7, 2)
x245
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(7, 2)
x246
29
return
 (6, 0) 
cell=(6, 1) neighbor=(6, 0)
x247
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x248
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(6, 0)
x248
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(6, 0)
x249
29
return
 (5, 2) 
cell=(6, 1) neighbor=(5, 2)
x250
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x251
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(5, 2)
x251
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(5, 2)
x252
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 1) neighbor=(5, 2)
x253
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x11
conways_game_of_life.py:31
def neighbors(cell):
cell=(7, 9)
x11
conways_game_of_life.py:32
    return {
cell=(7, 9)
x201
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 9)
x41
conways_game_of_life.py:32
    return {
cell=(7, 9)
x202
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x203
conways_game_of_life.py:32
    return {
cell=(7, 9)
x203
conways_game_of_life.py:32
    return {
cell=(7, 9)
x204
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 9)
x42
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=-1
x121
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=-1
x205
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=-1
x122
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=-1 dy=-1
x221
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=-1 dy=-1
x81
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=-1 dy=-1
x222
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=-1 dy=-1
x206
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=-1 dy=-1
x123
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=-1 dy=0
x223
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=-1 dy=0
x82
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=-1 dy=0
x224
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=-1 dy=0
x207
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=-1 dy=0
x124
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=-1 dy=1
x225
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=-1 dy=1
x83
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=-1 dy=1
x226
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=-1 dy=1
x208
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=-1 dy=1
x227
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=-1 dy=1
x209
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 9) dx=-1 dy=1
x43
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=0 dy=1
x125
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=0 dy=1
x210
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=0 dy=1
x126
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=0 dy=-1
x228
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=0 dy=-1
x84
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=0 dy=-1
x229
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=0 dy=-1
x211
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=0 dy=-1
x127
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=0 dy=0
x230
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=0 dy=0
x212
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=0 dy=0
x128
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=0 dy=1
x231
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=0 dy=1
x85
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=0 dy=1
x232
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=0 dy=1
x213
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=0 dy=1
x233
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=0 dy=1
x214
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 9) dx=0 dy=1
x44
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=1 dy=1
x129
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=1 dy=1
x215
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=1 dy=1
x130
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=-1
x234
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=1 dy=-1
x86
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=-1
x235
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=1 dy=-1
x216
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=1 dy=-1
x131
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=0
x236
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=1 dy=0
x87
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=0
x237
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=1 dy=0
x217
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 9) dx=1 dy=0
x132
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=1
x238
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 9) dx=1 dy=1
x88
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=1
x239
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=1 dy=1
x218
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=1
x240
conways_game_of_life.py:32
    return {
cell=(7, 9) dx=1 dy=1
x219
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 9) dx=1 dy=1
x241
36
return
 {(8, 8), (7, 10), (6, 8), (8, 10), (8, 9), (6, 10), (6, 9), (7, 8)} 
cell=(7, 9) dx=1 dy=1
x242
32
return
 {(8, 8), (7, 10), (6, 8), (8, 10), (8, 9), (6, 10), (6, 9), (7, 8)} 
cell=(7, 9)
x220
29
return
 (8, 8) 
cell=(7, 9) neighbor=(8, 8)
x254
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x255
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(8, 8)
x255
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(8, 8)
x256
29
return
 (7, 10) 
cell=(7, 9) neighbor=(7, 10)
x257
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x258
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(7, 10)
x258
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(7, 10)
x259
29
return
 (6, 8) 
cell=(7, 9) neighbor=(6, 8)
x260
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x261
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(6, 8)
x261
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(6, 8)
x262
29
return
 (8, 10) 
cell=(7, 9) neighbor=(8, 10)
x263
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x264
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(8, 10)
x264
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(8, 10)
x265
29
return
 (8, 9) 
cell=(7, 9) neighbor=(8, 9)
x266
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x267
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(8, 9)
x267
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(8, 9)
x268
29
return
 (6, 10) 
cell=(7, 9) neighbor=(6, 10)
x269
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x270
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(6, 10)
x270
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(6, 10)
x271
29
return
 (6, 9) 
cell=(7, 9) neighbor=(6, 9)
x272
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x273
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(6, 9)
x273
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(6, 9)
x274
29
return
 (7, 8) 
cell=(7, 9) neighbor=(7, 8)
x275
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x276
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(7, 8)
x276
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(7, 8)
x277
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 9) neighbor=(7, 8)
x278
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x12
conways_game_of_life.py:31
def neighbors(cell):
cell=(3, 2)
x12
conways_game_of_life.py:32
    return {
cell=(3, 2)
x221
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 2)
x45
conways_game_of_life.py:32
    return {
cell=(3, 2)
x222
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x223
conways_game_of_life.py:32
    return {
cell=(3, 2)
x223
conways_game_of_life.py:32
    return {
cell=(3, 2)
x224
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 2)
x46
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=-1
x133
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=-1
x225
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=-1
x134
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=-1 dy=-1
x243
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=-1 dy=-1
x89
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=-1 dy=-1
x244
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=-1 dy=-1
x226
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=-1 dy=-1
x135
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=-1 dy=0
x245
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=-1 dy=0
x90
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=-1 dy=0
x246
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=-1 dy=0
x227
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=-1 dy=0
x136
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=-1 dy=1
x247
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=-1 dy=1
x91
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=-1 dy=1
x248
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=-1 dy=1
x228
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=-1 dy=1
x249
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=-1 dy=1
x229
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 2) dx=-1 dy=1
x47
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=0 dy=1
x137
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=0 dy=1
x230
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=0 dy=1
x138
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=0 dy=-1
x250
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=0 dy=-1
x92
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=0 dy=-1
x251
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=0 dy=-1
x231
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=0 dy=-1
x139
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=0 dy=0
x252
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=0 dy=0
x232
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=0 dy=0
x140
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=0 dy=1
x253
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=0 dy=1
x93
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=0 dy=1
x254
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=0 dy=1
x233
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=0 dy=1
x255
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=0 dy=1
x234
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 2) dx=0 dy=1
x48
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=1 dy=1
x141
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=1 dy=1
x235
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=1 dy=1
x142
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=-1
x256
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=1 dy=-1
x94
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=-1
x257
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=1 dy=-1
x236
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=1 dy=-1
x143
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=0
x258
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=1 dy=0
x95
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=0
x259
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=1 dy=0
x237
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 2) dx=1 dy=0
x144
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=1
x260
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 2) dx=1 dy=1
x96
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=1
x261
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=1 dy=1
x238
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=1
x262
conways_game_of_life.py:32
    return {
cell=(3, 2) dx=1 dy=1
x239
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 2) dx=1 dy=1
x263
36
return
 {(2, 1), (4, 3), (3, 1), (4, 2), (2, 3), (3, 3), (2, 2), (4, 1)} 
cell=(3, 2) dx=1 dy=1
x264
32
return
 {(2, 1), (4, 3), (3, 1), (4, 2), (2, 3), (3, 3), (2, 2), (4, 1)} 
cell=(3, 2)
x240
29
return
 (2, 1) 
cell=(3, 2) neighbor=(2, 1)
x279
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x280
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(2, 1)
x280
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(2, 1)
x281
29
return
 (4, 3) 
cell=(3, 2) neighbor=(4, 3)
x282
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x283
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(4, 3)
x283
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(4, 3)
x284
29
return
 (3, 1) 
cell=(3, 2) neighbor=(3, 1)
x285
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x286
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(3, 1)
x286
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(3, 1)
x287
29
return
 (4, 2) 
cell=(3, 2) neighbor=(4, 2)
x288
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x289
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(4, 2)
x289
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(4, 2)
x290
29
return
 (2, 3) 
cell=(3, 2) neighbor=(2, 3)
x291
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x292
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(2, 3)
x292
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(2, 3)
x293
29
return
 (3, 3) 
cell=(3, 2) neighbor=(3, 3)
x294
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x295
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(3, 3)
x295
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(3, 3)
x296
29
return
 (2, 2) 
cell=(3, 2) neighbor=(2, 2)
x297
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x298
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(2, 2)
x298
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(2, 2)
x299
29
return
 (4, 1) 
cell=(3, 2) neighbor=(4, 1)
x300
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x301
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(4, 1)
x301
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(4, 1)
x302
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 2) neighbor=(4, 1)
x303
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x13
conways_game_of_life.py:31
def neighbors(cell):
cell=(3, 5)
x13
conways_game_of_life.py:32
    return {
cell=(3, 5)
x241
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 5)
x49
conways_game_of_life.py:32
    return {
cell=(3, 5)
x242
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x243
conways_game_of_life.py:32
    return {
cell=(3, 5)
x243
conways_game_of_life.py:32
    return {
cell=(3, 5)
x244
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 5)
x50
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=-1
x145
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=-1
x245
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=-1
x146
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=-1 dy=-1
x265
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=-1 dy=-1
x97
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=-1 dy=-1
x266
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=-1 dy=-1
x246
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=-1 dy=-1
x147
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=-1 dy=0
x267
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=-1 dy=0
x98
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=-1 dy=0
x268
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=-1 dy=0
x247
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=-1 dy=0
x148
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=-1 dy=1
x269
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=-1 dy=1
x99
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=-1 dy=1
x270
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=-1 dy=1
x248
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=-1 dy=1
x271
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=-1 dy=1
x249
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 5) dx=-1 dy=1
x51
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=0 dy=1
x149
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=0 dy=1
x250
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=0 dy=1
x150
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=0 dy=-1
x272
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=0 dy=-1
x100
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=0 dy=-1
x273
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=0 dy=-1
x251
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=0 dy=-1
x151
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=0 dy=0
x274
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=0 dy=0
x252
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=0 dy=0
x152
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=0 dy=1
x275
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=0 dy=1
x101
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=0 dy=1
x276
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=0 dy=1
x253
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=0 dy=1
x277
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=0 dy=1
x254
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(3, 5) dx=0 dy=1
x52
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=1 dy=1
x153
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=1 dy=1
x255
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=1 dy=1
x154
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=-1
x278
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=1 dy=-1
x102
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=-1
x279
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=1 dy=-1
x256
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=1 dy=-1
x155
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=0
x280
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=1 dy=0
x103
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=0
x281
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=1 dy=0
x257
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(3, 5) dx=1 dy=0
x156
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=1
x282
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(3, 5) dx=1 dy=1
x104
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=1
x283
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=1 dy=1
x258
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=1
x284
conways_game_of_life.py:32
    return {
cell=(3, 5) dx=1 dy=1
x259
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(3, 5) dx=1 dy=1
x285
36
return
 {(4, 4), (2, 4), (3, 4), (4, 6), (4, 5), (2, 6), (3, 6), (2, 5)} 
cell=(3, 5) dx=1 dy=1
x286
32
return
 {(4, 4), (2, 4), (3, 4), (4, 6), (4, 5), (2, 6), (3, 6), (2, 5)} 
cell=(3, 5)
x260
29
return
 (4, 4) 
cell=(3, 5) neighbor=(4, 4)
x304
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x305
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(4, 4)
x305
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(4, 4)
x306
29
return
 (2, 4) 
cell=(3, 5) neighbor=(2, 4)
x307
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x308
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(2, 4)
x308
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(2, 4)
x309
29
return
 (3, 4) 
cell=(3, 5) neighbor=(3, 4)
x310
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x311
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(3, 4)
x311
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(3, 4)
x312
29
return
 (4, 6) 
cell=(3, 5) neighbor=(4, 6)
x313
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x314
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(4, 6)
x314
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(4, 6)
x315
29
return
 (4, 5) 
cell=(3, 5) neighbor=(4, 5)
x316
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x317
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(4, 5)
x317
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(4, 5)
x318
29
return
 (2, 6) 
cell=(3, 5) neighbor=(2, 6)
x319
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x320
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(2, 6)
x320
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(2, 6)
x321
29
return
 (3, 6) 
cell=(3, 5) neighbor=(3, 6)
x322
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x323
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(3, 6)
x323
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(3, 6)
x324
29
return
 (2, 5) 
cell=(3, 5) neighbor=(2, 5)
x325
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x326
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(2, 5)
x326
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(2, 5)
x327
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(3, 5) neighbor=(2, 5)
x328
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x14
conways_game_of_life.py:31
def neighbors(cell):
cell=(9, 3)
x14
conways_game_of_life.py:32
    return {
cell=(9, 3)
x261
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(9, 3)
x53
conways_game_of_life.py:32
    return {
cell=(9, 3)
x262
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x263
conways_game_of_life.py:32
    return {
cell=(9, 3)
x263
conways_game_of_life.py:32
    return {
cell=(9, 3)
x264
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(9, 3)
x54
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=-1
x157
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=-1
x265
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=-1
x158
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=-1 dy=-1
x287
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=-1 dy=-1
x105
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=-1 dy=-1
x288
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=-1 dy=-1
x266
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=-1 dy=-1
x159
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=-1 dy=0
x289
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=-1 dy=0
x106
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=-1 dy=0
x290
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=-1 dy=0
x267
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=-1 dy=0
x160
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=-1 dy=1
x291
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=-1 dy=1
x107
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=-1 dy=1
x292
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=-1 dy=1
x268
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=-1 dy=1
x293
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=-1 dy=1
x269
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(9, 3) dx=-1 dy=1
x55
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=0 dy=1
x161
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=0 dy=1
x270
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=0 dy=1
x162
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=0 dy=-1
x294
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=0 dy=-1
x108
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=0 dy=-1
x295
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=0 dy=-1
x271
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=0 dy=-1
x163
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=0 dy=0
x296
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=0 dy=0
x272
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=0 dy=0
x164
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=0 dy=1
x297
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=0 dy=1
x109
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=0 dy=1
x298
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=0 dy=1
x273
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=0 dy=1
x299
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=0 dy=1
x274
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(9, 3) dx=0 dy=1
x56
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=1 dy=1
x165
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=1 dy=1
x275
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=1 dy=1
x166
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=-1
x300
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=1 dy=-1
x110
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=-1
x301
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=1 dy=-1
x276
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=1 dy=-1
x167
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=0
x302
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=1 dy=0
x111
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=0
x303
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=1 dy=0
x277
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(9, 3) dx=1 dy=0
x168
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=1
x304
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(9, 3) dx=1 dy=1
x112
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=1
x305
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=1 dy=1
x278
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=1
x306
conways_game_of_life.py:32
    return {
cell=(9, 3) dx=1 dy=1
x279
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(9, 3) dx=1 dy=1
x307
36
return
 {(8, 4), (10, 4), (9, 2), (8, 3), (10, 3), (8, 2), (10, 2), (9, 4)} 
cell=(9, 3) dx=1 dy=1
x308
32
return
 {(8, 4), (10, 4), (9, 2), (8, 3), (10, 3), (8, 2), (10, 2), (9, 4)} 
cell=(9, 3)
x280
29
return
 (8, 4) 
cell=(9, 3) neighbor=(8, 4)
x329
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x330
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(8, 4)
x330
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(8, 4)
x331
29
return
 (10, 4) 
cell=(9, 3) neighbor=(10, 4)
x332
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x333
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(10, 4)
x333
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(10, 4)
x334
29
return
 (9, 2) 
cell=(9, 3) neighbor=(9, 2)
x335
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x336
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(9, 2)
x336
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(9, 2)
x337
29
return
 (8, 3) 
cell=(9, 3) neighbor=(8, 3)
x338
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x339
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(8, 3)
x339
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(8, 3)
x340
29
return
 (10, 3) 
cell=(9, 3) neighbor=(10, 3)
x341
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x342
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(10, 3)
x342
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(10, 3)
x343
29
return
 (8, 2) 
cell=(9, 3) neighbor=(8, 2)
x344
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x345
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(8, 2)
x345
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(8, 2)
x346
29
return
 (10, 2) 
cell=(9, 3) neighbor=(10, 2)
x347
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x348
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(10, 2)
x348
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(10, 2)
x349
29
return
 (9, 4) 
cell=(9, 3) neighbor=(9, 4)
x350
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x351
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(9, 4)
x351
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(9, 4)
x352
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(9, 3) neighbor=(9, 4)
x353
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x15
conways_game_of_life.py:31
def neighbors(cell):
cell=(0, 3)
x15
conways_game_of_life.py:32
    return {
cell=(0, 3)
x281
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(0, 3)
x57
conways_game_of_life.py:32
    return {
cell=(0, 3)
x282
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x283
conways_game_of_life.py:32
    return {
cell=(0, 3)
x283
conways_game_of_life.py:32
    return {
cell=(0, 3)
x284
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(0, 3)
x58
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=-1
x169
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=-1
x285
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=-1
x170
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=-1 dy=-1
x309
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=-1 dy=-1
x113
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=-1 dy=-1
x310
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=-1 dy=-1
x286
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=-1 dy=-1
x171
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=-1 dy=0
x311
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=-1 dy=0
x114
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=-1 dy=0
x312
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=-1 dy=0
x287
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=-1 dy=0
x172
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=-1 dy=1
x313
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=-1 dy=1
x115
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=-1 dy=1
x314
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=-1 dy=1
x288
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=-1 dy=1
x315
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=-1 dy=1
x289
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(0, 3) dx=-1 dy=1
x59
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=0 dy=1
x173
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=0 dy=1
x290
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=0 dy=1
x174
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=0 dy=-1
x316
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=0 dy=-1
x116
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=0 dy=-1
x317
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=0 dy=-1
x291
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=0 dy=-1
x175
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=0 dy=0
x318
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=0 dy=0
x292
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=0 dy=0
x176
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=0 dy=1
x319
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=0 dy=1
x117
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=0 dy=1
x320
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=0 dy=1
x293
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=0 dy=1
x321
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=0 dy=1
x294
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(0, 3) dx=0 dy=1
x60
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=1 dy=1
x177
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=1 dy=1
x295
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=1 dy=1
x178
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=-1
x322
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=1 dy=-1
x118
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=-1
x323
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=1 dy=-1
x296
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=1 dy=-1
x179
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=0
x324
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=1 dy=0
x119
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=0
x325
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=1 dy=0
x297
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(0, 3) dx=1 dy=0
x180
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=1
x326
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(0, 3) dx=1 dy=1
x120
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=1
x327
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=1 dy=1
x298
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=1
x328
conways_game_of_life.py:32
    return {
cell=(0, 3) dx=1 dy=1
x299
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(0, 3) dx=1 dy=1
x329
36
return
 {(1, 2), (0, 4), (-1, 4), (1, 4), (0, 2), (-1, 3), (-1, 2), (1, 3)} 
cell=(0, 3) dx=1 dy=1
x330
32
return
 {(1, 2), (0, 4), (-1, 4), (1, 4), (0, 2), (-1, 3), (-1, 2), (1, 3)} 
cell=(0, 3)
x300
29
return
 (1, 2) 
cell=(0, 3) neighbor=(1, 2)
x354
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x355
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(1, 2)
x355
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(1, 2)
x356
29
return
 (0, 4) 
cell=(0, 3) neighbor=(0, 4)
x357
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x358
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(0, 4)
x358
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(0, 4)
x359
29
return
 (-1, 4) 
cell=(0, 3) neighbor=(-1, 4)
x360
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x361
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(-1, 4)
x361
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(-1, 4)
x362
29
return
 (1, 4) 
cell=(0, 3) neighbor=(1, 4)
x363
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x364
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(1, 4)
x364
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(1, 4)
x365
29
return
 (0, 2) 
cell=(0, 3) neighbor=(0, 2)
x366
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x367
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(0, 2)
x367
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(0, 2)
x368
29
return
 (-1, 3) 
cell=(0, 3) neighbor=(-1, 3)
x369
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x370
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(-1, 3)
x370
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(-1, 3)
x371
29
return
 (-1, 2) 
cell=(0, 3) neighbor=(-1, 2)
x372
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x373
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(-1, 2)
x373
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(-1, 2)
x374
29
return
 (1, 3) 
cell=(0, 3) neighbor=(1, 3)
x375
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x376
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(1, 3)
x376
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(1, 3)
x377
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(0, 3) neighbor=(1, 3)
x378
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x16
conways_game_of_life.py:31
def neighbors(cell):
cell=(2, 3)
x16
conways_game_of_life.py:32
    return {
cell=(2, 3)
x301
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 3)
x61
conways_game_of_life.py:32
    return {
cell=(2, 3)
x302
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x303
conways_game_of_life.py:32
    return {
cell=(2, 3)
x303
conways_game_of_life.py:32
    return {
cell=(2, 3)
x304
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 3)
x62
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=-1
x181
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=-1
x305
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=-1
x182
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=-1 dy=-1
x331
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=-1 dy=-1
x121
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=-1 dy=-1
x332
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=-1 dy=-1
x306
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=-1 dy=-1
x183
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=-1 dy=0
x333
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=-1 dy=0
x122
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=-1 dy=0
x334
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=-1 dy=0
x307
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=-1 dy=0
x184
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=-1 dy=1
x335
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=-1 dy=1
x123
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=-1 dy=1
x336
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=-1 dy=1
x308
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=-1 dy=1
x337
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=-1 dy=1
x309
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 3) dx=-1 dy=1
x63
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=0 dy=1
x185
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=0 dy=1
x310
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=0 dy=1
x186
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=0 dy=-1
x338
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=0 dy=-1
x124
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=0 dy=-1
x339
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=0 dy=-1
x311
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=0 dy=-1
x187
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=0 dy=0
x340
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=0 dy=0
x312
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=0 dy=0
x188
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=0 dy=1
x341
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=0 dy=1
x125
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=0 dy=1
x342
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=0 dy=1
x313
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=0 dy=1
x343
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=0 dy=1
x314
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 3) dx=0 dy=1
x64
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=1 dy=1
x189
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=1 dy=1
x315
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=1 dy=1
x190
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=-1
x344
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=1 dy=-1
x126
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=-1
x345
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=1 dy=-1
x316
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=1 dy=-1
x191
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=0
x346
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=1 dy=0
x127
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=0
x347
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=1 dy=0
x317
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 3) dx=1 dy=0
x192
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=1
x348
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 3) dx=1 dy=1
x128
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=1
x349
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=1 dy=1
x318
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=1
x350
conways_game_of_life.py:32
    return {
cell=(2, 3) dx=1 dy=1
x319
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 3) dx=1 dy=1
x351
36
return
 {(2, 4), (1, 2), (3, 4), (1, 4), (3, 3), (2, 2), (3, 2), (1, 3)} 
cell=(2, 3) dx=1 dy=1
x352
32
return
 {(2, 4), (1, 2), (3, 4), (1, 4), (3, 3), (2, 2), (3, 2), (1, 3)} 
cell=(2, 3)
x320
29
return
 (2, 4) 
cell=(2, 3) neighbor=(2, 4)
x379
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x380
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(2, 4)
x380
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(2, 4)
x381
29
return
 (1, 2) 
cell=(2, 3) neighbor=(1, 2)
x382
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x383
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(1, 2)
x383
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(1, 2)
x384
29
return
 (3, 4) 
cell=(2, 3) neighbor=(3, 4)
x385
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x386
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(3, 4)
x386
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(3, 4)
x387
29
return
 (1, 4) 
cell=(2, 3) neighbor=(1, 4)
x388
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x389
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(1, 4)
x389
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(1, 4)
x390
29
return
 (3, 3) 
cell=(2, 3) neighbor=(3, 3)
x391
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x392
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(3, 3)
x392
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(3, 3)
x393
29
return
 (2, 2) 
cell=(2, 3) neighbor=(2, 2)
x394
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x395
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(2, 2)
x395
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(2, 2)
x396
29
return
 (3, 2) 
cell=(2, 3) neighbor=(3, 2)
x397
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x398
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(3, 2)
x398
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(3, 2)
x399
29
return
 (1, 3) 
cell=(2, 3) neighbor=(1, 3)
x400
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x401
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(1, 3)
x401
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(1, 3)
x402
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 3) neighbor=(1, 3)
x403
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x17
conways_game_of_life.py:31
def neighbors(cell):
cell=(2, 6)
x17
conways_game_of_life.py:32
    return {
cell=(2, 6)
x321
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 6)
x65
conways_game_of_life.py:32
    return {
cell=(2, 6)
x322
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x323
conways_game_of_life.py:32
    return {
cell=(2, 6)
x323
conways_game_of_life.py:32
    return {
cell=(2, 6)
x324
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 6)
x66
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=-1
x193
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=-1
x325
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=-1
x194
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=-1 dy=-1
x353
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=-1 dy=-1
x129
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=-1 dy=-1
x354
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=-1 dy=-1
x326
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=-1 dy=-1
x195
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=-1 dy=0
x355
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=-1 dy=0
x130
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=-1 dy=0
x356
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=-1 dy=0
x327
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=-1 dy=0
x196
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=-1 dy=1
x357
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=-1 dy=1
x131
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=-1 dy=1
x358
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=-1 dy=1
x328
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=-1 dy=1
x359
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=-1 dy=1
x329
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 6) dx=-1 dy=1
x67
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=0 dy=1
x197
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=0 dy=1
x330
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=0 dy=1
x198
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=0 dy=-1
x360
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=0 dy=-1
x132
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=0 dy=-1
x361
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=0 dy=-1
x331
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=0 dy=-1
x199
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=0 dy=0
x362
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=0 dy=0
x332
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=0 dy=0
x200
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=0 dy=1
x363
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=0 dy=1
x133
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=0 dy=1
x364
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=0 dy=1
x333
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=0 dy=1
x365
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=0 dy=1
x334
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(2, 6) dx=0 dy=1
x68
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=1 dy=1
x201
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=1 dy=1
x335
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=1 dy=1
x202
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=-1
x366
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=1 dy=-1
x134
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=-1
x367
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=1 dy=-1
x336
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=1 dy=-1
x203
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=0
x368
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=1 dy=0
x135
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=0
x369
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=1 dy=0
x337
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(2, 6) dx=1 dy=0
x204
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=1
x370
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(2, 6) dx=1 dy=1
x136
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=1
x371
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=1 dy=1
x338
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=1
x372
conways_game_of_life.py:32
    return {
cell=(2, 6) dx=1 dy=1
x339
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(2, 6) dx=1 dy=1
x373
36
return
 {(2, 7), (1, 5), (3, 7), (1, 7), (3, 6), (1, 6), (2, 5), (3, 5)} 
cell=(2, 6) dx=1 dy=1
x374
32
return
 {(2, 7), (1, 5), (3, 7), (1, 7), (3, 6), (1, 6), (2, 5), (3, 5)} 
cell=(2, 6)
x340
29
return
 (2, 7) 
cell=(2, 6) neighbor=(2, 7)
x404
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x405
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(2, 7)
x405
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(2, 7)
x406
29
return
 (1, 5) 
cell=(2, 6) neighbor=(1, 5)
x407
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x408
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(1, 5)
x408
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(1, 5)
x409
29
return
 (3, 7) 
cell=(2, 6) neighbor=(3, 7)
x410
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x411
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(3, 7)
x411
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(3, 7)
x412
29
return
 (1, 7) 
cell=(2, 6) neighbor=(1, 7)
x413
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x414
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(1, 7)
x414
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(1, 7)
x415
29
return
 (3, 6) 
cell=(2, 6) neighbor=(3, 6)
x416
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x417
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(3, 6)
x417
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(3, 6)
x418
29
return
 (1, 6) 
cell=(2, 6) neighbor=(1, 6)
x419
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x420
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(1, 6)
x420
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(1, 6)
x421
29
return
 (2, 5) 
cell=(2, 6) neighbor=(2, 5)
x422
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x423
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(2, 5)
x423
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(2, 5)
x424
29
return
 (3, 5) 
cell=(2, 6) neighbor=(3, 5)
x425
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x426
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(3, 5)
x426
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(3, 5)
x427
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(2, 6) neighbor=(3, 5)
x428
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x18
conways_game_of_life.py:31
def neighbors(cell):
cell=(6, 0)
x18
conways_game_of_life.py:32
    return {
cell=(6, 0)
x341
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 0)
x69
conways_game_of_life.py:32
    return {
cell=(6, 0)
x342
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x343
conways_game_of_life.py:32
    return {
cell=(6, 0)
x343
conways_game_of_life.py:32
    return {
cell=(6, 0)
x344
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 0)
x70
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=-1
x205
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=-1
x345
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=-1
x206
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=-1 dy=-1
x375
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=-1 dy=-1
x137
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=-1 dy=-1
x376
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=-1 dy=-1
x346
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=-1 dy=-1
x207
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=-1 dy=0
x377
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=-1 dy=0
x138
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=-1 dy=0
x378
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=-1 dy=0
x347
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=-1 dy=0
x208
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=-1 dy=1
x379
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=-1 dy=1
x139
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=-1 dy=1
x380
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=-1 dy=1
x348
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=-1 dy=1
x381
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=-1 dy=1
x349
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 0) dx=-1 dy=1
x71
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=0 dy=1
x209
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=0 dy=1
x350
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=0 dy=1
x210
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=0 dy=-1
x382
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=0 dy=-1
x140
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=0 dy=-1
x383
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=0 dy=-1
x351
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=0 dy=-1
x211
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=0 dy=0
x384
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=0 dy=0
x352
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=0 dy=0
x212
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=0 dy=1
x385
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=0 dy=1
x141
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=0 dy=1
x386
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=0 dy=1
x353
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=0 dy=1
x387
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=0 dy=1
x354
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(6, 0) dx=0 dy=1
x72
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=1 dy=1
x213
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=1 dy=1
x355
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=1 dy=1
x214
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=-1
x388
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=1 dy=-1
x142
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=-1
x389
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=1 dy=-1
x356
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=1 dy=-1
x215
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=0
x390
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=1 dy=0
x143
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=0
x391
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=1 dy=0
x357
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(6, 0) dx=1 dy=0
x216
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=1
x392
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(6, 0) dx=1 dy=1
x144
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=1
x393
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=1 dy=1
x358
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=1
x394
conways_game_of_life.py:32
    return {
cell=(6, 0) dx=1 dy=1
x359
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(6, 0) dx=1 dy=1
x395
36
return
 {(7, -1), (7, 1), (6, 1), (5, -1), (7, 0), (6, -1), (5, 1), (5, 0)} 
cell=(6, 0) dx=1 dy=1
x396
32
return
 {(7, -1), (7, 1), (6, 1), (5, -1), (7, 0), (6, -1), (5, 1), (5, 0)} 
cell=(6, 0)
x360
29
return
 (7, -1) 
cell=(6, 0) neighbor=(7, -1)
x429
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x430
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(7, -1)
x430
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(7, -1)
x431
29
return
 (7, 1) 
cell=(6, 0) neighbor=(7, 1)
x432
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x433
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(7, 1)
x433
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(7, 1)
x434
29
return
 (6, 1) 
cell=(6, 0) neighbor=(6, 1)
x435
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x436
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(6, 1)
x436
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(6, 1)
x437
29
return
 (5, -1) 
cell=(6, 0) neighbor=(5, -1)
x438
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x439
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(5, -1)
x439
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(5, -1)
x440
29
return
 (7, 0) 
cell=(6, 0) neighbor=(7, 0)
x441
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x442
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(7, 0)
x442
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(7, 0)
x443
29
return
 (6, -1) 
cell=(6, 0) neighbor=(6, -1)
x444
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x445
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(6, -1)
x445
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(6, -1)
x446
29
return
 (5, 1) 
cell=(6, 0) neighbor=(5, 1)
x447
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x448
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(5, 1)
x448
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(5, 1)
x449
29
return
 (5, 0) 
cell=(6, 0) neighbor=(5, 0)
x450
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x451
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(5, 0)
x451
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(5, 0)
x452
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(6, 0) neighbor=(5, 0)
x453
conways_game_of_life.py:31 neighbors
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
STACK [7]
x19
conways_game_of_life.py:31
def neighbors(cell):
cell=(7, 5)
x19
conways_game_of_life.py:32
    return {
cell=(7, 5)
x361
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 5)
x73
conways_game_of_life.py:32
    return {
cell=(7, 5)
x362
conways_game_of_life.py:32 <setcomp>
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
100: . . . . . . . . . . . . . . .
101: . . . . . . . . . . . . . . .
102: 
STACK [8]
x363
conways_game_of_life.py:32
    return {
cell=(7, 5)
x363
conways_game_of_life.py:32
    return {
cell=(7, 5)
x364
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 5)
x74
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=-1
x217
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=-1
x365
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=-1
x218
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=-1 dy=-1
x397
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=-1 dy=-1
x145
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=-1 dy=-1
x398
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=-1 dy=-1
x366
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=-1 dy=-1
x219
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=-1 dy=0
x399
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=-1 dy=0
x146
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=-1 dy=0
x400
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=-1 dy=0
x367
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=-1 dy=0
x220
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=-1 dy=1
x401
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=-1 dy=1
x147
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=-1 dy=1
x402
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=-1 dy=1
x368
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=-1 dy=1
x403
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=-1 dy=1
x369
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 5) dx=-1 dy=1
x75
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=0 dy=1
x221
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=0 dy=1
x370
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=0 dy=1
x222
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=0 dy=-1
x404
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=0 dy=-1
x148
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=0 dy=-1
x405
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=0 dy=-1
x371
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=0 dy=-1
x223
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=0 dy=0
x406
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=0 dy=0
x372
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=0 dy=0
x224
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=0 dy=1
x407
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=0 dy=1
x149
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=0 dy=1
x408
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=0 dy=1
x373
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=0 dy=1
x409
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=0 dy=1
x374
conways_game_of_life.py:34
        for dx in [-1, 0, 1]
cell=(7, 5) dx=0 dy=1
x76
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=1 dy=1
x225
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=1 dy=1
x375
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=1 dy=1
x226
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=-1
x410
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=1 dy=-1
x150
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=-1
x411
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=1 dy=-1
x376
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=1 dy=-1
x227
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=0
x412
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=1 dy=0
x151
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=0
x413
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=1 dy=0
x377
conways_game_of_life.py:35
        for dy in [-1, 0, 1]
cell=(7, 5) dx=1 dy=0
x228
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=1
x414
conways_game_of_life.py:33
        (cell[0] + dx, cell[1] + dy)
cell=(7, 5) dx=1 dy=1
x152
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=1
x415
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=1 dy=1
x378
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=1
x416
conways_game_of_life.py:32
    return {
cell=(7, 5) dx=1 dy=1
x379
conways_game_of_life.py:36
        if (dx, dy) != (0, 0)
cell=(7, 5) dx=1 dy=1
x417
36
return
 {(7, 4), (8, 4), (6, 5), (6, 4), (7, 6), (8, 6), (6, 6), (8, 5)} 
cell=(7, 5) dx=1 dy=1
x418
32
return
 {(7, 4), (8, 4), (6, 5), (6, 4), (7, 6), (8, 6), (6, 6), (8, 5)} 
cell=(7, 5)
x380
29
return
 (7, 4) 
cell=(7, 5) neighbor=(7, 4)
x454
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x455
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(7, 4)
x455
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(7, 4)
x456
29
return
 (8, 4) 
cell=(7, 5) neighbor=(8, 4)
x457
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x458
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(8, 4)
x458
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(8, 4)
x459
29
return
 (6, 5) 
cell=(7, 5) neighbor=(6, 5)
x460
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x461
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(6, 5)
x461
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(6, 5)
x462
29
return
 (6, 4) 
cell=(7, 5) neighbor=(6, 4)
x463
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x464
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(6, 4)
x464
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(6, 4)
x465
29
return
 (7, 6) 
cell=(7, 5) neighbor=(7, 6)
x466
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x467
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(7, 6)
x467
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(7, 6)
x468
29
return
 (8, 6) 
cell=(7, 5) neighbor=(8, 6)
x469
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x470
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(8, 6)
x470
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(8, 6)
x471
29
return
 (6, 6) 
cell=(7, 5) neighbor=(6, 6)
x472
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x473
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(6, 6)
x473
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(6, 6)
x474
29
return
 (8, 5) 
cell=(7, 5) neighbor=(8, 5)
x475
conways_game_of_life.py:29 <genexpr>
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
92: @ . . . . . . . . . . . . . .
93: @ @ . . . . . . . . . . . . .
94: . . . . . . . . . . . . . . .
95: . . . . . . . . . . . . . . .
96: . . . . . . . . . . . . . . .
97: . . . . . . . . . . . . . . .
98: . . . . . . . . . . . . . . .
99: . . . . . . . . . . . . . . .
STACK [6]
x476
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(8, 5)
x476
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(8, 5)
x477
conways_game_of_life.py:29
    return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
cell=(7, 5) neighbor=(8, 5)
x478
29
return
 None 
cell=(7, 5) neighbor=(8, 5)
x479
__init__.py:691
        if kwds:
self=<too long> kwds={}
x1
691
return
 None 
self=<too long> kwds={}
x2
599
return
 None 
self=<too long> kwds={}
x2
29
return
 Counter({(3, 2): 4, (7, 1): 4, (3, 3): 4, (2, 1): 3, (2, 2): 3, (4, 1): 3, (4, 3): 3, (7, 0): 3, (1, 2): 3, (3, 1): 3, (1, 3): 3, (2, 5): 3, (5, 1): 3, (4, 2): 2, (4, 4): 2, (6, 5): 2, (6, 4): 2, (4, 5): 2, (5, 3): 2, (7, -1): 2, (8, 1): 2, (9, 1): 2, (7, 7): 2, (8, 7): 2, (7, 6): 2, (9, 7): 2, (8, 5): 2, (2, 3): 2, (2, 7): 2, (1, 5): 2, (1, 7): 2, (2, 6): 2, (5, 2): 2, (9, 2): 2, (8, 3): 2, (7, 2): 2, (8, 9): 2, (7, 8): 2, (5, 0): 2, (2, 4): 2, (3, 4): 2, (3, 6): 2, (8, 4): 2, (1, 4): 2, (4, 0): 1, (2, 0): 1, (3, 0): 1, (5, 5): 1, (6, 3): 1, (9, 0): 1, (8, -1): 1, (9, -1): 1, (9, 6): 1, (9, 5): 1, (7, 5): 1, (1, 1): 1, (0, 7): 1, (0, 6): 1, (0, 5): 1, (9, 3): 1, (7, 3): 1, (9, 9): 1, (7, 9): 1, (9, 8): 1, (6, 2): 1, (6, 0): 1, (8, 8): 1, (7, 10): 1, (6, 8): 1, (8, 10): 1, (6, 10): 1, (6, 9): 1, (4, 6): 1, (10, 4): 1, (10, 3): 1, (8, 2): 1, (10, 2): 1, (9, 4): 1, (0, 4): 1, (-1, 4): 1, (0, 2): 1, (-1, 3): 1, (-1, 2): 1, (3, 7): 1, (1, 6): 1, (3, 5): 1, (6, 1): 1, (5, -1): 1, (6, -1): 1, (7, 4): 1, (8, 6): 1, (6, 6): 1}) 
alive_cells=<too long>
x480
conways_game_of_life.py:21
    return {
alive_cells=<too long>
x2
conways_game_of_life.py:21 <setcomp>
18: 
19: 
20: def next_generation(alive_cells):
21:     return {
22:         cell
23:         for cell, count in neighbor_counts(alive_cells).items()
24:         if count == 3 or (cell in alive_cells and count == 2)
25:     }
26: 
27: def neighbor_counts(alive_cells):
28:     """A Counter of the number of live neighbors for each cell."""
29:     return Counter(neighbor for cell in alive_cells for neighbor in neighbors(cell))
30: 
31: def neighbors(cell):
32:     return {
33:         (cell[0] + dx, cell[1] + dy)
34:         for dx in [-1, 0, 1]
35:         for dy in [-1, 0, 1]
36:         if (dx, dy) != (0, 0)
37:     }
38: 
39: def make_random_world(size, alive_probability=0.2):
40:     # Create a size x size world where each cell has a probability of alive_probability to be alive
41:     return {(x, y) for x in range(size) for y in range(size) if random.random() < alive_probability}
42: 
43: LIVE  = '@'
44: EMPTY = '.'
45: PAD   = ' '
46: def picture(world, Xs: range, Ys: range) -> str:
47:     """Return a picture of the world: a grid of characters representing the cells in this window."""
48:     def row(y): return PAD.join(LIVE if (x, y) in world else EMPTY for x in Xs)
49:     return '\n'.join(row(y) for y in Ys)
50: 
51: 
52: world = make_random_world(10, 0.2)
53: 
54: sys.path.append('/Users/barisozmen/development/github/barisozmen')
55: print(sys.path)
56: from stackobserver import StackObserver
57: 
58: with StackObserver():
59:     for _ in range(1):
60:         print(f'Generation {_}')
61:         print(picture(world, range(15), range(15)))
62:         world = next_generation(world)
63:         print('\n')
64: 
65: 
66: """ Output after running `python3 conways_game_of_life.py`
67: 
68: Generation 0
69: . . . . . . . . . . . . . . .
70: . . . . . . . . . . . . . . .
71: . . @ . @ . . . @ . . . . . .
72: . @ . @ . . @ . @ . . . . . .
73: @ . . @ . . . @ . @ . . . . .
74: @ . . . . . . . . . . . . . .
75: @ @ . . . . . . . . . . . . .
76: . . . @ . . . . . . . . . . .
77: . . . . @ . . . . . . . . . .
78: . . . . . . @ . . @ . . . . .
79: . . . . . . . . . . . . . . .
80: . . . . . . . . . . . . . . .
81: . . . . . . . . . . . . . . .
82: . . . . . . . . . . . . . . .
83: . . . . . . . . . . . . . . .
84: 
85: 
86: Generation 1
87: . . . . . . . . . . . . . . .
88: . . . . . . . . . . . . . . .
89: . . @ @ . . . @ . . . . . . .
90: . @ . @ @ . . . @ @ . . . . .
91: @ @ @ . . . . @ @ . . . . . .
STACK [3]
x3
conways_game_of_life.py:21
    return {
alive_cells=<too long>
x3
conways_game_of_life.py:21
    return {
alive_cells=<too long>
x4
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long>
x2
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 0) count=1
x1
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(4, 0) count=1
x5
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(4, 0) count=1
x3
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 1) count=3
x2
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(2, 1) count=3
x1
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 1) count=3
x3
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 1) count=3
x6
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 1) count=3
x4
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 0) count=1
x4
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 0) count=1
x7
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 0) count=1
x5
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 2) count=2
x5
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(4, 2) count=2
x2
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 2) count=2
x6
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(4, 2) count=2
x8
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(4, 2) count=2
x6
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 0) count=1
x7
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 0) count=1
x9
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 0) count=1
x7
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 2) count=3
x8
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(2, 2) count=3
x3
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 2) count=3
x9
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 2) count=3
x10
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 2) count=3
x8
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 2) count=4
x10
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 2) count=4
x11
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 2) count=4
x9
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 1) count=3
x11
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(4, 1) count=3
x4
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 1) count=3
x12
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(4, 1) count=3
x12
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(4, 1) count=3
x10
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 4) count=2
x13
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(4, 4) count=2
x13
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(4, 4) count=2
x11
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(5, 5) count=1
x14
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(5, 5) count=1
x14
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(5, 5) count=1
x12
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 5) count=2
x15
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 5) count=2
x15
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 5) count=2
x13
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 3) count=3
x16
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(4, 3) count=3
x5
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 3) count=3
x17
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(4, 3) count=3
x16
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(4, 3) count=3
x14
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 4) count=2
x18
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 4) count=2
x17
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 4) count=2
x15
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 5) count=2
x19
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(4, 5) count=2
x18
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(4, 5) count=2
x16
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(5, 3) count=2
x20
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(5, 3) count=2
x19
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(5, 3) count=2
x17
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 3) count=1
x21
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 3) count=1
x20
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 3) count=1
x18
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, -1) count=2
x22
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, -1) count=2
x21
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, -1) count=2
x19
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 0) count=1
x23
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 0) count=1
x22
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 0) count=1
x20
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, -1) count=1
x24
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, -1) count=1
x23
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, -1) count=1
x21
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 1) count=4
x25
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 1) count=4
x24
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 1) count=4
x22
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 1) count=2
x26
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 1) count=2
x25
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 1) count=2
x23
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 0) count=3
x27
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(7, 0) count=3
x6
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 0) count=3
x28
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 0) count=3
x26
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 0) count=3
x24
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, -1) count=1
x29
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, -1) count=1
x27
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, -1) count=1
x25
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 1) count=2
x30
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 1) count=2
x28
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 1) count=2
x26
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 7) count=2
x31
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 7) count=2
x29
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 7) count=2
x27
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 7) count=2
x32
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 7) count=2
x30
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 7) count=2
x28
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 6) count=1
x33
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 6) count=1
x31
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 6) count=1
x29
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 5) count=1
x34
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 5) count=1
x32
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 5) count=1
x30
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 6) count=2
x35
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 6) count=2
x33
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 6) count=2
x31
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 5) count=1
x36
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 5) count=1
x34
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 5) count=1
x32
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 7) count=2
x37
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 7) count=2
x35
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 7) count=2
x33
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 5) count=2
x38
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 5) count=2
x36
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 5) count=2
x34
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 2) count=3
x39
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(1, 2) count=3
x7
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 2) count=3
x40
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(1, 2) count=3
x37
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(1, 2) count=3
x35
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 1) count=3
x41
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(3, 1) count=3
x8
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 1) count=3
x42
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 1) count=3
x38
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 1) count=3
x36
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 1) count=1
x43
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(1, 1) count=1
x39
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(1, 1) count=1
x37
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 3) count=2
x44
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(2, 3) count=2
x9
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 3) count=2
x45
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 3) count=2
x40
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 3) count=2
x38
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 3) count=4
x46
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 3) count=4
x41
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 3) count=4
x39
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 3) count=3
x47
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(1, 3) count=3
x10
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 3) count=3
x48
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(1, 3) count=3
x42
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(1, 3) count=3
x40
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(0, 7) count=1
x49
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(0, 7) count=1
x43
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(0, 7) count=1
x41
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 7) count=2
x50
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 7) count=2
x44
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 7) count=2
x42
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 5) count=2
x51
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(1, 5) count=2
x45
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(1, 5) count=2
x43
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(0, 6) count=1
x52
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(0, 6) count=1
x46
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(0, 6) count=1
x44
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 7) count=2
x53
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(1, 7) count=2
x47
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(1, 7) count=2
x45
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 6) count=2
x54
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(2, 6) count=2
x11
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 6) count=2
x55
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 6) count=2
x48
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 6) count=2
x46
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(0, 5) count=1
x56
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(0, 5) count=1
x49
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(0, 5) count=1
x47
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 5) count=3
x57
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(2, 5) count=3
x12
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 5) count=3
x58
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 5) count=3
x50
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 5) count=3
x48
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(5, 1) count=3
x59
conways_game_of_life.py:22
        cell
alive_cells=<too long> cell=(5, 1) count=3
x13
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(5, 1) count=3
x60
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(5, 1) count=3
x51
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(5, 1) count=3
x49
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(5, 2) count=2
x61
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(5, 2) count=2
x52
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(5, 2) count=2
x50
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 3) count=1
x62
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 3) count=1
x53
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 3) count=1
x51
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 2) count=2
x63
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 2) count=2
x54
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 2) count=2
x52
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 3) count=1
x64
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 3) count=1
x55
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 3) count=1
x53
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 3) count=2
x65
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 3) count=2
x56
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 3) count=2
x54
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 2) count=2
x66
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 2) count=2
x57
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 2) count=2
x55
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 9) count=1
x67
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 9) count=1
x58
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 9) count=1
x56
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 9) count=1
x68
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 9) count=1
x59
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 9) count=1
x57
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 9) count=2
x69
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 9) count=2
x60
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 9) count=2
x58
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 8) count=1
x70
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 8) count=1
x61
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 8) count=1
x59
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 8) count=2
x71
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 8) count=2
x62
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 8) count=2
x60
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 2) count=1
x72
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 2) count=1
x63
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 2) count=1
x61
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(5, 0) count=2
x73
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(5, 0) count=2
x64
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(5, 0) count=2
x62
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 0) count=1
x74
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 0) count=1
x65
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 0) count=1
x63
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 8) count=1
x75
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 8) count=1
x66
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 8) count=1
x64
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 10) count=1
x76
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 10) count=1
x67
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 10) count=1
x65
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 8) count=1
x77
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 8) count=1
x68
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 8) count=1
x66
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 10) count=1
x78
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 10) count=1
x69
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 10) count=1
x67
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 10) count=1
x79
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 10) count=1
x70
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 10) count=1
x68
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 9) count=1
x80
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 9) count=1
x71
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 9) count=1
x69
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(2, 4) count=2
x81
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(2, 4) count=2
x72
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(2, 4) count=2
x70
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 4) count=2
x82
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 4) count=2
x73
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 4) count=2
x71
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(4, 6) count=1
x83
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(4, 6) count=1
x74
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(4, 6) count=1
x72
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 6) count=2
x84
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 6) count=2
x75
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 6) count=2
x73
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 4) count=2
x85
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 4) count=2
x76
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 4) count=2
x74
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(10, 4) count=1
x86
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(10, 4) count=1
x77
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(10, 4) count=1
x75
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(10, 3) count=1
x87
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(10, 3) count=1
x78
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(10, 3) count=1
x76
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 2) count=1
x88
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 2) count=1
x79
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 2) count=1
x77
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(10, 2) count=1
x89
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(10, 2) count=1
x80
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(10, 2) count=1
x78
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(9, 4) count=1
x90
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(9, 4) count=1
x81
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(9, 4) count=1
x79
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(0, 4) count=1
x91
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(0, 4) count=1
x82
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(0, 4) count=1
x80
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(-1, 4) count=1
x92
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(-1, 4) count=1
x83
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(-1, 4) count=1
x81
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 4) count=2
x93
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(1, 4) count=2
x84
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(1, 4) count=2
x82
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(0, 2) count=1
x94
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(0, 2) count=1
x85
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(0, 2) count=1
x83
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(-1, 3) count=1
x95
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(-1, 3) count=1
x86
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(-1, 3) count=1
x84
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(-1, 2) count=1
x96
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(-1, 2) count=1
x87
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(-1, 2) count=1
x85
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 7) count=1
x97
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 7) count=1
x88
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 7) count=1
x86
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(1, 6) count=1
x98
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(1, 6) count=1
x89
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(1, 6) count=1
x87
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(3, 5) count=1
x99
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(3, 5) count=1
x90
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(3, 5) count=1
x88
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 1) count=1
x100
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 1) count=1
x91
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, 1) count=1
x89
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(5, -1) count=1
x101
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(5, -1) count=1
x92
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(5, -1) count=1
x90
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, -1) count=1
x102
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, -1) count=1
x93
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(6, -1) count=1
x91
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(7, 4) count=1
x103
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(7, 4) count=1
x94
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(7, 4) count=1
x92
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(8, 6) count=1
x104
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(8, 6) count=1
x95
conways_game_of_life.py:23
        for cell, count in neighbor_counts(alive_cells).items()
alive_cells=<too long> cell=(8, 6) count=1
x93
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 6) count=1
x105
conways_game_of_life.py:21
    return {
alive_cells=<too long> cell=(6, 6) count=1
x96
conways_game_of_life.py:24
        if count == 3 or (cell in alive_cells and count == 2)
alive_cells=<too long> cell=(6, 6) count=1
x106
24
return
 {(1, 3), (1, 2), (2, 1), (4, 3), (3, 1), (7, 0), (5, 1), (4, 2), (2, 3), (2, 6), (2, 2), (2, 5), (4, 1)} 
alive_cells=<too long> cell=(6, 6) count=1
x107
21
return
 {(1, 3), (1, 2), (2, 1), (4, 3), (3, 1), (7, 0), (5, 1), (4, 2), (2, 3), (2, 6), (2, 2), (2, 5), (4, 1)} 
alive_cells=<too long>
x97